本文整理汇总了C#中ICSharpCode.XmlEditor.XmlElementPath类的典型用法代码示例。如果您正苦于以下问题:C# XmlElementPath类的具体用法?C# XmlElementPath怎么用?C# XmlElementPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlElementPath类属于ICSharpCode.XmlEditor命名空间,在下文中一共展示了XmlElementPath类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Equality
public void Equality()
{
XmlElementPath newPath = new XmlElementPath();
newPath.Elements.Add(new QualifiedName("foo", "http://foo"));
Assert.IsTrue(newPath.Equals(path), "Should be equal.");
}
示例2: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("html", "http://foo/xhtml"));
htmlChildElements = SchemaCompletion.GetChildElementCompletion(path);
}
示例3: Init
public void Init()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("a", "a-namespace"));
path.AddElement(new QualifiedName("b", "b-namespace"));
paths = new XmlElementPathsByNamespace(path);
}
示例4: FixtureInit
public override void FixtureInit()
{
noteElementPath = new XmlElementPath();
noteElementPath.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
elementData = SchemaCompletionData.GetChildElementCompletionData(noteElementPath);
}
示例5: NotEqual
public void NotEqual()
{
XmlElementPath newPath = new XmlElementPath();
newPath.Elements.Add(new QualifiedName("Foo", "bar"));
Assert.IsFalse(newPath.Equals(path), "Should not be equal.");
}
示例6: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("schema", "http://www.w3.org/2001/XMLSchema"));
schemaChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
schemaAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get include elements attributes.
path.Elements.Add(new QualifiedName("include", "http://www.w3.org/2001/XMLSchema"));
includeAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get annotation element info.
path.Elements.RemoveLast();
path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema"));
annotationChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
annotationAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get app info attributes.
path.Elements.Add(new QualifiedName("appinfo", "http://www.w3.org/2001/XMLSchema"));
appInfoAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get foo attributes.
path = new XmlElementPath();
path.Elements.Add(new QualifiedName("foo", "http://www.w3.org/2001/XMLSchema"));
fooAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
}
示例7: DesignSurfacePath2
public void DesignSurfacePath2()
{
XmlElementPath expectedPath = new XmlElementPath();
expectedPath.Elements.Add(new QualifiedName("DesignSurface", "clr-namespace:ICSharpCode.WpfDesign.Designer;assembly=ICSharpCode.WpfDesign.Designer", "designer"));
Assert.AreEqual(expectedPath, designSurfacePath2);
}
示例8: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("foo", "http://foo.com"));
attributeCompletionItems = SchemaCompletion.GetAttributeCompletion(path);
}
示例9: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("note", "http://www.w3schools.com"));
noteChildElements = SchemaCompletion.GetChildElementCompletion(path);
}
示例10: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("foo", "http://foo.com"));
fooChildElementCompletion = SchemaCompletion.GetChildElementCompletion(path);
}
示例11: EmptyDocumentTest
public void EmptyDocumentTest()
{
elementPath = XmlParser.GetActiveElementStartPathAtIndex("", 0);
expectedElementPath = new XmlElementPath();
Assert.IsTrue(elementPath.Equals(expectedElementPath),
"Incorrect active element path.");
}
示例12: ElementPathContainsSingleRootElement
public void ElementPathContainsSingleRootElement()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("root", String.Empty));
Assert.AreEqual(path, selectedElement.Path);
}
示例13: XmlElementPathHasOneElement
public void XmlElementPathHasOneElement()
{
XmlElementPath expectedPath = new XmlElementPath();
expectedPath.AddElement(new QualifiedName("a", "a-namespace"));
Assert.AreEqual(expectedPath, paths[0]);
}
示例14: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("root", "http://foo"));
path.Elements.Add(new QualifiedName("bar", "http://foo"));
barElementAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
}
示例15: XamlExpressionContext
public XamlExpressionContext(XmlElementPath elementPath, string attributeName, bool inAttributeValue)
{
if (elementPath == null)
throw new ArgumentNullException("elementPath");
this.ElementPath = elementPath;
this.AttributeName = attributeName;
this.InAttributeValue = inAttributeValue;
}