当前位置: 首页>>代码示例>>C#>>正文


C# XmlEditor.QualifiedName类代码示例

本文整理汇总了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());
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:QualifiedNameTestFixture.cs

示例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.");
		}	
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:QualifiedNameTestFixture.cs

示例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.");
		}		
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:QualifiedNameTestFixture.cs

示例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);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:AttributeNameUnderCursorTests.cs

示例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.");
		}		
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:QualifiedNameTestFixture.cs

示例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);
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:AttributeNameTestFixture.cs

示例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);
 }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:7,代码来源:AttributeNameUnderCursorTests.cs

示例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);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:AttributeNameUnderCursorTests.cs

示例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'");
		}	
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:AttributeNameTestFixture.cs

示例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]);
        }
开发者ID:Erguotou,项目名称:SharpDevelop,代码行数:8,代码来源:QualifiedNameCollectionTests.cs

示例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);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:QualifiedNameCollectionTests.cs

示例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);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:TwoElementPathTestFixture.cs

示例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"));
        }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:12,代码来源:TwoElementSchemaTestFixture.cs

示例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);
        }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:16,代码来源:ReferencedElementsTestFixture.cs

示例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;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:10,代码来源:XmlSchemaDefinition.cs


注:本文中的ICSharpCode.XmlEditor.QualifiedName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。