Configuration Section Designer示例

Configuration Section Designer是一个图型化设计.net的配置块和自动生成需要代码和schema定义的codeplex上的一个开源项目。它是vs的一个插件,需要Microsoft Visual Studio 2008 Standard Edition or better的版本.

http://www.codeplex.com/csd下载最新的安装文件,目前最新的是1.1.1版本。安装完后会在vs2008中多一个工程模板Configuration Section Project,你也可以在现有的工程中添加一个ConfigurationSectionDesigner项,效果是一样。

这是一个基于微软领域特定语言(DSL)工具 - Visual Studio DSL Tool设计的项目,关于DSL可以从以下站点获得相关知识。

Visual Studio Extensibility DSL Tools Visual Studio Domain Specific Language tools

作者没有提供示例程序,我琢磨了一会写了个,研究的不深,仅供参考。

一、新建一个控制台程序

二、添加ConfigurationSectionDesigner子项

newitem

三、生成的解决方案如下,红框中的4个文件是ConfigurationSectionDesigner生成的。

project

ConfigurationSection.csd: 图型设计文件. ConfigurationSectionCode.tt: a text template code generator that generates the C# code for the configuration section. ConfigurationSectionSample.tt: generates a sample configuration file. ConfigurationSectionSchema.tt: generates the XSD schema representing the configuration section.

三、通过从工具箱中拖拽Configuration Sections, Configuration Elements and Configuration Element Collections完成中间的图型设计的

me

四、读取配置文件

result

 

Demo下载

1118065.html

shore 2008-03-22 21:58 发表评论

转载于:https://www.cnblogs.com/hotsoho.net/archive/2008/03/22/1178855.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值