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


C# XmlElementPath.Equals方法代码示例

本文整理汇总了C#中ICSharpCode.XmlEditor.XmlElementPath.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElementPath.Equals方法的具体用法?C# XmlElementPath.Equals怎么用?C# XmlElementPath.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICSharpCode.XmlEditor.XmlElementPath的用法示例。


在下文中一共展示了XmlElementPath.Equals方法的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.");
        }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:7,代码来源:SingleElementPathTestFixture.cs

示例2: NotEqual

        public void NotEqual()
        {
            XmlElementPath newPath = new XmlElementPath();
            newPath.Elements.Add(new QualifiedName("Foo", "bar"));

            Assert.IsFalse(newPath.Equals(path), "Should not be equal.");
        }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:7,代码来源:SingleElementPathTestFixture.cs

示例3: EmptyDocumentTest

		public void EmptyDocumentTest()
		{
			elementPath = XmlParser.GetActiveElementStartPathAtIndex("", 0);
			expectedElementPath = new XmlElementPath();
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}
开发者ID:Inzaghi2012,项目名称:SharpDevelop,代码行数:7,代码来源:ActiveElementUnderCursorTests.cs

示例4: CompactPathItem

        public void CompactPathItem()
        {
            XmlElementPath newPath = new XmlElementPath();
            newPath.AddElement(new QualifiedName("bar", "http://bar", "b"));

            path.Compact();
            Assert.IsTrue(newPath.Equals(path), "Should be equal.");
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:TwoElementPathTestFixture.cs

示例5: NotEqual

		public void NotEqual()
		{
			XmlElementPath newPath = new XmlElementPath();
			newPath.AddElement(new QualifiedName("aaa", "a", "a"));
			newPath.AddElement(new QualifiedName("bbb", "b", "b"));
			
			Assert.IsFalse(newPath.Equals(path), "Should not be equal.");
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:TwoElementPathTestFixture.cs

示例6: ElementPathsByNamespaceFoo

        public void ElementPathsByNamespaceFoo()
        {
            XmlElementPathsByNamespace paths = new XmlElementPathsByNamespace(path);
            XmlElementPath fooPath = paths[0];

            XmlElementPath expectedPath = new XmlElementPath();
            expectedPath.AddElement(new QualifiedName("foo", "http://foo", "f"));

            Assert.IsTrue(expectedPath.Equals(fooPath));
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:TwoElementPathTestFixture.cs

示例7: PathTest1

		public void PathTest1()
		{
			string text = "<foo xmlns='" + namespaceURI + "' ";
			elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}		
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:10,代码来源:ActiveElementStartPathTestFixture.cs

示例8: GetActiveElementStartPathForRootElementWithNamespacePrefix

		public void GetActiveElementStartPathForRootElementWithNamespacePrefix()
		{
			string text = "<x:foo xmlns:x='" + namespaceURI + "' ";
			elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI, "x"));
			Assert.IsTrue(expectedElementPath.Equals(elementPath), 
			              "Incorrect active element path.");
		}	
开发者ID:hefnerliu,项目名称:SharpDevelop,代码行数:10,代码来源:ActiveElementStartPathTestFixture.cs

示例9: SuccessTest4

        public void SuccessTest4()
        {
            string text = "<bar xmlns='http://test.com'><foo xmlns='" + namespaceURI + "' ><";
            elementPath = XmlParser.GetParentElementPath(text);

            expectedElementPath = new XmlElementPath();
            expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
            Assert.IsTrue(elementPath.Equals(expectedElementPath),
                          "Incorrect active element path.");
        }
开发者ID:BackupTheBerlios,项目名称:nantgui,代码行数:10,代码来源:ParentElementPathTestFixture.cs

示例10: GetParentElementPathForRootElementAfterEmptyChildElementEnd

		public void GetParentElementPathForRootElementAfterEmptyChildElementEnd()
		{
			string text = "<foo xmlns='" + namespaceURI + "' ><bar/><";
			elementPath = XmlParser.GetParentElementPath(text);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:10,代码来源:ParentElementPathTestFixture.cs

示例11: ElementPathsByNamespaceBar

        public void ElementPathsByNamespaceBar()
        {
            XmlElementPathsByNamespace paths = new XmlElementPathsByNamespace(path);
            XmlElementPath barPath = paths[1];

            XmlElementPath expectedPath = new XmlElementPath();
            expectedPath.AddElement(new QualifiedName("bar", "http://bar", "b"));

            Assert.IsTrue(expectedPath.Equals(barPath));
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:TwoElementPathTestFixture.cs

示例12: GetParentElementPathForTwoElementsInDifferentNamespaces

		public void GetParentElementPathForTwoElementsInDifferentNamespaces()
		{
			string text = "<bar xmlns='http://test.com'><foo xmlns='" + namespaceURI + "' ><";
			elementPath = XmlParser.GetParentElementPath(text);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("bar", "http://test.com"));
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:11,代码来源:ParentElementPathTestFixture.cs

示例13: PathTest3

		public void PathTest3()
		{
			string text = "<foo xmlns='" + namespaceURI + "'><bar>";
			elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("ar>"));
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.AddElement(new QualifiedName("foo", namespaceURI));
			expectedElementPath.AddElement(new QualifiedName("bar", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath), 
			              "Incorrect active element path.");
		}
开发者ID:Inzaghi2012,项目名称:SharpDevelop,代码行数:11,代码来源:ActiveElementUnderCursorTests.cs

示例14: ComplexPathTabTest

		public void ComplexPathTabTest()
		{
			string text = "<foo xmlns='" + namespaceURI + "'><bar";
			string text2 = "\t</foo>";
			elementPath = XmlParser.GetActiveElementStartPathAtIndex(text + text2, text.Length);
			
			expectedElementPath = new XmlElementPath();
			expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
			expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
			Assert.IsTrue(elementPath.Equals(expectedElementPath),
			              "Incorrect active element path.");
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:12,代码来源:XmlTests.cs

示例15: ChangeNamespaceForTwoElementsWithoutNamespaceModifiesAllItems

		public void ChangeNamespaceForTwoElementsWithoutNamespaceModifiesAllItems()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("root", String.Empty));
			path.AddElement(new QualifiedName("child", String.Empty));
			path.SetNamespaceForUnqualifiedNames("http://test");
			
			XmlElementPath expectedPath = new XmlElementPath();
			expectedPath.AddElement(new QualifiedName("root", "http://test"));
			expectedPath.AddElement(new QualifiedName("child", "http://test"));
			
			Assert.IsTrue(expectedPath.Equals(path));
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:13,代码来源:ChangeElementPathDefaultNamespaceTests.cs


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