本文整理汇总了C#中Configuration.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Configuration.Clone方法的具体用法?C# Configuration.Clone怎么用?C# Configuration.Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration
的用法示例。
在下文中一共展示了Configuration.Clone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetConfiguration
public override Configuration GetConfiguration (Configuration defaultConfiguration) {
var result = defaultConfiguration.Clone();
result.FrameworkVersion = 4.0;
result.Assemblies.Proxies.Add("%jsildirectory%/JSIL.Proxies.XNA4.dll");
return (Configuration)result;
}
示例2: GetConfiguration
public override Configuration GetConfiguration(Configuration defaultConfiguration)
{
var result = defaultConfiguration.Clone();
result.FrameworkVersion = 3.5;
result.Assemblies.Proxies.Add("JSIL.Proxies.XNA3.dll");
Common.InitConfiguration(result);
return result;
}
示例3: MergeConfigurations
static Configuration MergeConfigurations(Configuration baseConfiguration, params Configuration[] toMerge)
{
var result = baseConfiguration.Clone();
foreach (var m in toMerge)
m.MergeInto(result);
return result;
}
示例4: Merge
/// <summary>
/// 见基类
/// </summary>
public override void Merge(Configuration config)
{
Configuration copy = config.Clone();
foreach (KeyValuePair<string, ConfigurationSection> e1 in copy)
{
ConfigurationSection sect;
if (!TryGetValue(e1.Key, out sect))
{
Add(e1.Key, e1.Value);
}
else
{
foreach (KeyValuePair<string, string> e2 in e1.Value)
{
if (sect.ContainsKey(e2.Key))
{
sect.Remove(e2.Key);
}
sect.Add(e2.Key, e2.Value);
}
}
}
}