本文整理汇总了C#中ModuleWeaver.ReadConfig方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleWeaver.ReadConfig方法的具体用法?C# ModuleWeaver.ReadConfig怎么用?C# ModuleWeaver.ReadConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleWeaver
的用法示例。
在下文中一共展示了ModuleWeaver.ReadConfig方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IncludeAndExcludeNamespacesAttribute
public void IncludeAndExcludeNamespacesAttribute()
{
var xElement = XElement.Parse(@"
<Virtuosity IncludeNamespaces='Bar' ExcludeNamespaces='Foo'/>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
}
示例2: TrueHideObsoleteMembers
public void TrueHideObsoleteMembers()
{
var xElement = XElement.Parse(@"<Obsolete HideObsoleteMembers='true'/>");
var moduleWeaver = new ModuleWeaver {Config = xElement};
moduleWeaver.ReadConfig();
Assert.IsTrue(moduleWeaver.HideObsoleteMembers);
}
示例3: ThrowsNotImplementedText
public void ThrowsNotImplementedText()
{
var xElement = XElement.Parse(@"<Obsolete ThrowsNotImplementedText='Custom Text'/>");
var moduleWeaver = new ModuleWeaver {Config = xElement};
moduleWeaver.ReadConfig();
Assert.AreEqual("Custom Text", moduleWeaver.ThrowsNotImplementedText);
}
示例4: CanParseStepType
public void CanParseStepType()
{
var xElement = XElement.Parse(@"<Obsolete StepType='Minor'/>");
var moduleWeaver = new ModuleWeaver {Config = xElement};
moduleWeaver.ReadConfig();
Assert.AreEqual(StepType.Minor, moduleWeaver.StepType);
}
示例5: IncludeAndExcludeNamespacesAttribute
public void IncludeAndExcludeNamespacesAttribute()
{
var xElement = XElement.Parse(@"
<EmptyConstructor IncludeNamespaces='Bar' ExcludeNamespaces='Foo'/>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
var exception = Assert.Throws<WeavingException>(() => moduleWeaver.ReadConfig());
Assert.AreEqual("Either configure IncludeNamespaces OR ExcludeNamespaces, not both.",exception.Message);
}
示例6: IncludeNamespacesAttribute
public void IncludeNamespacesAttribute()
{
var xElement = XElement.Parse(@"
<Virtuosity IncludeNamespaces='Foo|Bar'/>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual("Foo", moduleWeaver.IncludeNamespaces[0]);
Assert.AreEqual("Bar", moduleWeaver.IncludeNamespaces[1]);
}
示例7: ExcludeNamespacesAttribute
public void ExcludeNamespacesAttribute()
{
var xElement = XElement.Parse(@"
<EmptyConstructor ExcludeNamespaces='Foo|Bar'/>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual("Foo", moduleWeaver.ExcludeNamespaces[0]);
Assert.AreEqual("Bar", moduleWeaver.ExcludeNamespaces[1]);
}
示例8: IncludeNamespacesCombined
public void IncludeNamespacesCombined()
{
var xElement = XElement.Parse(@"
<Virtuosity IncludeNamespaces='Foo'>
<IncludeNamespaces>
Bar
</IncludeNamespaces>
</Virtuosity>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual("Foo", moduleWeaver.IncludeNamespaces[0]);
Assert.AreEqual("Bar", moduleWeaver.IncludeNamespaces[1]);
}
示例9: ExcludeNamespacesCombined
public void ExcludeNamespacesCombined()
{
var xElement = XElement.Parse(@"
<EmptyConstructor ExcludeNamespaces='Foo'>
<ExcludeNamespaces>
Bar
</ExcludeNamespaces>
</EmptyConstructor>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual("Foo", moduleWeaver.ExcludeNamespaces[0]);
Assert.AreEqual("Bar", moduleWeaver.ExcludeNamespaces[1]);
}
示例10: ExcludeNamespacesNode
public void ExcludeNamespacesNode()
{
var xElement = XElement.Parse(@"
<Virtuosity>
<ExcludeNamespaces>
Foo
Bar
</ExcludeNamespaces>
</Virtuosity>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual("Foo", moduleWeaver.ExcludeNamespaces[0]);
Assert.AreEqual("Bar", moduleWeaver.ExcludeNamespaces[1]);
}
示例11: IncludeNamespacesNode
public void IncludeNamespacesNode()
{
var xElement = XElement.Parse(@"
<EmptyConstructor>
<IncludeNamespaces>
Foo
Bar
Foo.Bar
</IncludeNamespaces>
</EmptyConstructor>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual("Foo", moduleWeaver.IncludeNamespaces[0]);
Assert.AreEqual("Bar", moduleWeaver.IncludeNamespaces[1]);
Assert.AreEqual("Foo.Bar", moduleWeaver.IncludeNamespaces[2]);
}
示例12: VisibilityPublic
public void VisibilityPublic()
{
var xElement = XElement.Parse("<EmptyConstructor Visibility='public'/>");
var moduleWeaver = new ModuleWeaver { Config = xElement };
moduleWeaver.ReadConfig();
Assert.AreEqual(MethodAttributes.Public, moduleWeaver.Visibility);
}