📄 vsahandler.cs
字号:
using System;
using System.Configuration;
using System.Xml;
using DotNetTools.Util;
using DotNetTools.Workflow.Loader;
namespace DotNetTools.Workflow.Util.Vsa
{
/// <summary>
/// vsa configuration seciton handler
/// </summary>
/// <author>jjx</author>
public class VsaHandler : IConfigurationSectionHandler
{
public const String SECTION_NAME="dotnettools.workflow.util.vsa";
public object Create(object parent, object configContext, XmlNode section)
{
VsaConfig config=new VsaConfig();
XmlNodeList dl=section.SelectNodes("reference");
foreach(XmlNode node in dl)
{
String location=XMLUtil.GetAttribute(node,"location");
if (!TextUtils.HasText(location))
new ArgumentNullException("location required");
config.References.Add(location);
}
dl=section.SelectNodes("import");
foreach(XmlNode node in dl)
{
String ns=XMLUtil.GetAttribute(node,"namespace");
if (!TextUtils.HasText(ns))
new ArgumentNullException("namespace required");
config.Imports.Add(ns);
}
return config;
}
public VsaHandler()
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -