本文整理汇总了C#中ICSharpCode.XmlEditor.QualifiedName类的典型用法代码示例。如果您正苦于以下问题:C# QualifiedName类的具体用法?C# QualifiedName怎么用?C# QualifiedName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QualifiedName类属于ICSharpCode.XmlEditor命名空间,在下文中一共展示了QualifiedName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HashCodeTest
public void HashCodeTest()
{
QualifiedName name1 = new QualifiedName("foo", "http://foo.com", "f");
XmlQualifiedName xmlQualifiedName = new XmlQualifiedName("foo", "http://foo.com");
Assert.AreEqual(name1.GetHashCode(), xmlQualifiedName.GetHashCode());
}
示例2: EqualsTest3
public void EqualsTest3()
{
QualifiedName name1 = new QualifiedName("foo", "http://foo.com", "f");
QualifiedName name2 = new QualifiedName("foo", "http://foo.com", "ggg");
Assert.IsTrue(name1 == name2, "Should be the same.");
}
示例3: NotEqualsTest2
public void NotEqualsTest2()
{
QualifiedName name1 = new QualifiedName("foo", "http://foo.com", "f");
QualifiedName name2 = null;
Assert.IsFalse(name1 == name2, "Should not be the same.");
}
示例4: SuccessTest8
public void SuccessTest8()
{
string text = "<a type='a";
QualifiedName expectedName = new QualifiedName("type", String.Empty);
QualifiedName name = XmlParser.GetQualifiedAttributeNameAtIndex(text, text.Length);
Assert.AreEqual(expectedName, name);
}
示例5: EqualsTest2
public void EqualsTest2()
{
QualifiedName name1 = new QualifiedName("foo", "http://foo.com", "f");
QualifiedName name2 = new QualifiedName("foo", "http://foo.com", "f");
Assert.AreEqual(name1, name2, "Should be the same.");
}
示例6: AttributeWithPrefix
public void AttributeWithPrefix()
{
string text = " a:test=";
QualifiedName expectedName = new QualifiedName("test", String.Empty, "a");
QualifiedName name = XmlParser.GetQualifiedAttributeName(text, text.Length);
Assert.AreEqual(expectedName, name);
}
示例7: AttributeNameWithPrefix2
public void AttributeNameWithPrefix2()
{
string text = "<a xab:test=";
QualifiedName expectedName = new QualifiedName("test", String.Empty, "xab");
QualifiedName name = XmlParser.GetQualifiedAttributeNameAtIndex(text, text.IndexOf("xa"));
Assert.AreEqual(expectedName, name);
}
示例8: SuccessTest5
public void SuccessTest5()
{
string text = "<a foo=";
QualifiedName expectedName = new QualifiedName("foo", String.Empty);
QualifiedName name = XmlParser.GetQualifiedAttributeNameAtIndex(text, 3);
Assert.AreEqual(expectedName, name);
}
示例9: SuccessTest6
public void SuccessTest6()
{
string text = " foo = '#";
QualifiedName expectedName = new QualifiedName("foo", String.Empty);
QualifiedName name = XmlParser.GetQualifiedAttributeName(text, text.Length);
Assert.AreEqual(expectedName, name, "Should have retrieved the attribute name 'foo'");
}
示例10: CreateQualifiedNameCollectionInstanceUsingQualifiedNameCollection
public void CreateQualifiedNameCollectionInstanceUsingQualifiedNameCollection()
{
QualifiedName[] array = new QualifiedName[] { firstName, secondName };
QualifiedNameCollection oldCollection = new QualifiedNameCollection(array);
QualifiedNameCollection newCollection = new QualifiedNameCollection(oldCollection);
Assert.AreSame(firstName, newCollection[0]);
}
示例11: Init
public void Init()
{
firstName = new QualifiedName("first", "first-ns", "first-prefix");
secondName = new QualifiedName("second", "second-ns", "second-prefix");
QualifiedName[] array = new QualifiedName[] { firstName, secondName };
qualifiedNameCollection = new QualifiedNameCollection(array);
}
示例12: Init
public void Init()
{
path = new XmlElementPath();
firstQualifiedName = new QualifiedName("foo", "http://foo", "f");
path.AddElement(firstQualifiedName);
secondQualifiedName = new QualifiedName("bar", "http://bar", "b");
path.AddElement(secondQualifiedName);
}
示例13: FixtureInit
public override void FixtureInit()
{
// Note element path.
noteElementPath = new XmlElementPath();
QualifiedName noteQualifiedName = new QualifiedName("note", "http://www.w3schools.com");
noteElementPath.Elements.Add(noteQualifiedName);
// Text element path.
textElementPath = new XmlElementPath();
textElementPath.Elements.Add(noteQualifiedName);
textElementPath.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
}
示例14: FixtureInit
public override void FixtureInit()
{
// Get shipto attributes.
shipToPath = new XmlElementPath();
QualifiedName shipOrderName = new QualifiedName("shiporder", "http://www.w3schools.com");
shipToPath.Elements.Add(shipOrderName);
shipToPath.Elements.Add(new QualifiedName("shipto", "http://www.w3schools.com"));
shipToAttributes = SchemaCompletionData.GetAttributeCompletionData(shipToPath);
// Get shiporder attributes.
shipOrderPath = new XmlElementPath();
shipOrderPath.Elements.Add(shipOrderName);
shipOrderAttributes = SchemaCompletionData.GetAttributeCompletionData(shipOrderPath);
}
示例15: FindSchemaObjectType
XmlSchemaObject FindSchemaObjectType(QualifiedName qualifiedName, string elementName, XmlSchemaCompletion schema)
{
switch (elementName) {
case "element":
return schema.FindComplexType(qualifiedName);
case "attribute":
return schema.FindSimpleType(qualifiedName.Name);
}
return null;
}