1、引用vJine.Core;

2、定义配置类;

using System;
using System.Collections.Generic;
using System.Text; using System.Xml.Serialization; namespace vJineCore_QuickStart {
[Serializable]
public class My_Config {
[XmlAttribute]
public string name {
get;
set;
} [XmlAttribute]
public bool IsActive {
get;
set;
} [XmlElement]
public string file_name {
get;
set;
}
}
}

3、获取配置节类名;

4、新增配置节;

<configSections>
<section name="my_config_1" type="vJine.Core.AppConfig`1[[vJineCore_QuickStart.My_Config, vJineCore_QuickStart]], vJine.Core"/>
<sectionGroup name="my_config">
<section name="_2" type="vJine.Core.AppConfig`1[[vJineCore_QuickStart.My_Config, vJineCore_QuickStart]], vJine.Core"/>
</sectionGroup>
</configSections>
<my_config_1 name="Hello" IsActive="true">
<file_name>d:/hello/world.cfg</file_name>
</my_config_1>
<my_config>
<_2 name="Hello" IsActive="false">
<file_name>d:/hello/world.cfg</file_name>
</_2>
</my_config>

5、读取配置;

轮子来袭 vJine.Core 之 AppConfig<T>的更多相关文章

  1. 轮子来袭 vJine.Core Orm 之 04_使用进阶

    1.配置文件: 框架默认情况下支持"connectionStrings"的配置方式,如<轮子来袭 vJine.Core Orm 之 01_快速入门>所述: 框架的进阶设 ...

  2. 轮子来袭 vJine.Core Orm 之 03_架构分析

    1.vJine.Core ORM 架构: 如上图所示,vJine.Core ORM的特点如下: 所有操作均以DataManager为核心: DataManager业务部分的增删改查操作依赖于Class ...

  3. 轮子来袭 vJine.Core Orm 之 02_代码生成

    1.下载并安装动软代码生成器: 2.下载vJine.Core.Orm模板: 3.解压模本文件并复制到如下的动软代码生成器模板目录: 4.打开动软代码生成器会看到模板已识别加载: 5.选择模板代码批量生 ...

  4. 轮子来袭 vJine.Core Orm 之 01_快速体验

    vJine.Core 是.Net环境下C#类库,在其包含的众多功能中ORM功能尤为突出,现简介如下. 一.支持的数据库: SQLite, MySQL, MS SQL, Oracle. 二.使用方法: ...

  5. vJine.Core 0.3.0.49 正式发布

    nuget: https://www.nuget.org/packages/vJine.Core/ oschina: http://git.oschina.net/vjine/vJine.Core/a ...

  6. vJine 第三波 之 Lua 来袭 vJine.Lua

    vJine.Lua vJine.Lua是Lua语言的C#封装库,可实现通过C#直接运行Lua脚本并与Lua脚本交互的功能. 1. 授权: MPL2.0 相关资源: nuget:(https://www ...

  7. asp.net core 基于 JSON 实现多语言

    asp.net core 基于 JSON 实现多语言 Intro 上次我们提到了,微软默认提供基于资源文件的多语言本地化,个人感觉使用起来不是太方便,没有 json 看起来直观,于是动手造了一个轮子, ...

  8. 2014年6月份第3周51Aspx源码发布详情

      基于知识树的多课程网络教学平台源码  2014-6-16 [VS2008]功能介绍:本平台是一个支持网上教学的网站,支持多个课程,教师可根据需要创建课程,进行课程结构.题库等的管理.   技术特色 ...

  9. (转)C# 数据类型映射 (SQLite,MySQL,MSSQL,Oracle)

    一.C# vs SQLite: C# SQLite 字段名 类型 库类型 GetFieldType(#) 转换 备注 F_BOOL bool BIT NOT NULL Boolean F_BOOL_N ...

随机推荐

  1. Cocos2d-x 3.x学习笔记(一):开始Cocos2d之旅

    首先,进入官网下载cocos2d-x:http://www.cocos.com/download/,当然你需要注册一个账号才可以下载. 接下来需要跟着官网的配置文档配置一下开发环境,不得不说,Coco ...

  2. java.io.File中的pathSeparator与separator的区别

    先总的说一下区别:File.pathSeparator指的是分隔连续多个路径字符串的分隔符,例如:java   -cp   test.jar;abc.jar   HelloWorld就是指“;” Fi ...

  3. Genymotion中文手册

    目录1.概述 22.特点 22.1最擅长于虚拟Android 22.2高可控性 22.3管理你的设备 22.4从Eclipse中开启虚拟设备 33.要求 33.1操作系统要求 33.2系统硬件要求 3 ...

  4. IOS UILabel自动换行

    { UILabel *lb=[[UILabel alloc]initWithFrame:CGRectMake(offset_xx, offset_yy, , )]; [lb setText:@&quo ...

  5. 继续推广我的新博客xysay:http://www.xysay.com/

    RT 博客收拾了一下,准备以后就在那里记录论文笔记啦,求交流,求推荐,求友链~~~ http://www.xysay.com/

  6. esui控件validatebox 通过正则判断输入 json传值

    <td> @Html.TextBoxFor(m => m.ActualInvoiceFee, new { @id = "txtActualInvoiceFee", ...

  7. [Practical Git] Clean up commits with git rebase

    Sometimes its nice to clean up commits before merging them into your main code repo; in this lesson, ...

  8. Android ListView快速定位(二)

    方法二:android:textFilterEnabled="true" + Filter 这个属性在android.widget.AbsListView下,要求adapter必须 ...

  9. sphinx的简单实例

    sphinx.conf中的配置: source indexLocation { type = mysql sql_host = 192.168.1.113 sql_user = root sql_pa ...

  10. android129 zhihuibeijing 聊天机器人

    上屏幕界面activity_main.xml: 语音识别界面 <LinearLayout xmlns:android="http://schemas.android.com/apk/r ...