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


C# XmlCompletionItemCollection类代码示例

本文整理汇总了C#中XmlCompletionItemCollection的典型用法代码示例。如果您正苦于以下问题:C# XmlCompletionItemCollection类的具体用法?C# XmlCompletionItemCollection怎么用?C# XmlCompletionItemCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XmlCompletionItemCollection类属于命名空间,在下文中一共展示了XmlCompletionItemCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetCompletionWindowWidth

		void SetCompletionWindowWidth(ICompletionListWindow completionWindow, XmlCompletionItemCollection completionItems)
		{
			XmlCompletionItem firstListItem = completionItems[0];
			if (firstListItem.DataType == XmlCompletionItemType.NamespaceUri) {
				completionWindow.Width = double.NaN;
			}
		}
开发者ID:rbrunhuber,项目名称:SharpDevelop,代码行数:7,代码来源:XmlCodeCompletionBinding.cs

示例2: LinkElementHasAddressAndXlinkHrefAttribute

		public void LinkElementHasAddressAndXlinkHrefAttribute()
		{
			XmlCompletionItemCollection expectedAttributes = new XmlCompletionItemCollection();
			expectedAttributes.Add(new XmlCompletionItem("address", XmlCompletionItemType.XmlAttribute));
			expectedAttributes.Add(new XmlCompletionItem("xlink:href", XmlCompletionItemType.XmlAttribute));
			
			Assert.AreEqual(expectedAttributes.ToArray(), linkElementAttributes.ToArray());
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:SimpleContentExtensionBaseTypeWithAttributeTestFixture.cs

示例3: ListCompleteMethodCallsCompletionItemCompleteMethod

        public void ListCompleteMethodCallsCompletionItemCompleteMethod()
        {
            CompletionContext context = new CompletionContext();
            XmlCompletionItemCollection completionItems = new XmlCompletionItemCollection();
            completionItems.Complete(context, this);

            Assert.AreSame(contextPassedToCompleteMethod, context);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:CompleteCompletionItemListTestFixture.cs

示例4: CanGetCompletionItemsUsedAsShowCompletionMethodParameters

		public void CanGetCompletionItemsUsedAsShowCompletionMethodParameters()
		{
			XmlCompletionItemCollection list = new XmlCompletionItemCollection();
			list.Add(new XmlCompletionItem("a"));
			editor.ShowCompletionWindow(list);

			Assert.AreSame(list, editor.CompletionItemsDisplayed);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:MockTextEditorTests.cs

示例5: CanCheckCompletionWindowFromShowCompletionHasWidthPropertyModified

		public void CanCheckCompletionWindowFromShowCompletionHasWidthPropertyModified()
		{
			XmlCompletionItemCollection list = new XmlCompletionItemCollection();
			list.Add(new XmlCompletionItem("a"));
			ICompletionListWindow window = editor.ShowCompletionWindow(list);
			window.Width = double.NaN;
			
			Assert.AreEqual(double.NaN, editor.CompletionWindowDisplayed.Width);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:MockTextEditorTests.cs

示例6: Init

		public void Init()
		{
			firstItem = new XmlCompletionItem("text", "desc-1", XmlCompletionItemType.XmlElement);
			secondItem = new XmlCompletionItem("text2", "desc-2", XmlCompletionItemType.XmlAttribute);
			
			itemCollection = new XmlCompletionItemCollection();
			itemCollection.Add(firstItem);
			itemCollection.Add(secondItem);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:XmlCompletionItemCollectionTests.cs

示例7: ExpectedCompletionDataItems

		public void ExpectedCompletionDataItems()
		{
			XmlCompletionItemCollection expectedItems = new XmlCompletionItemCollection();
			expectedItems.Add(new XmlCompletionItem("a", XmlCompletionItemType.NamespaceUri));
			expectedItems.Add(new XmlCompletionItem("b", XmlCompletionItemType.NamespaceUri));
			expectedItems.Add(new XmlCompletionItem("c", XmlCompletionItemType.NamespaceUri));
			
			Assert.AreEqual(expectedItems.ToArray(), textEditor.CompletionItemsDisplayedToArray());
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:NamespaceCompletionWindowTestFixture.cs

示例8: CanConvertCompletionItemsUsedAsShowCompletionMethodParametersToArray

		public void CanConvertCompletionItemsUsedAsShowCompletionMethodParametersToArray()
		{
			XmlCompletionItem item = new XmlCompletionItem("a");
			List<XmlCompletionItem> expectedArray = new List<XmlCompletionItem>();
			expectedArray.Add(item);
			
			XmlCompletionItemCollection list = new XmlCompletionItemCollection();
			list.Add(item);
			editor.ShowCompletionWindow(list);

			Assert.AreEqual(expectedArray.ToArray(), editor.CompletionItemsDisplayedToArray());
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:12,代码来源:MockTextEditorTests.cs

示例9: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("schema", "http://www.w3.org/2001/XMLSchema"));
			
			schemaChildElements = SchemaCompletion.GetChildElementCompletion(path);
			schemaAttributes = SchemaCompletion.GetAttributeCompletion(path);
			
			// Get include elements attributes.
			path.AddElement(new QualifiedName("include", "http://www.w3.org/2001/XMLSchema"));
			includeAttributes = SchemaCompletion.GetAttributeCompletion(path);
		
			// Get annotation element info.
			path.Elements.RemoveLast();
			path.AddElement(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema"));
			
			annotationChildElements = SchemaCompletion.GetChildElementCompletion(path);
			annotationAttributes = SchemaCompletion.GetAttributeCompletion(path);
		
			// Get app info attributes.
			path.AddElement(new QualifiedName("appinfo", "http://www.w3.org/2001/XMLSchema"));
			appInfoAttributes = SchemaCompletion.GetAttributeCompletion(path);
			
			// Get foo attributes.
			path = new XmlElementPath();
			path.AddElement(new QualifiedName("foo", "http://www.w3.org/2001/XMLSchema"));
			fooAttributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:28,代码来源:ExtensionElementTestFixture.cs

示例10: FixtureInit

        public override void FixtureInit()
        {
            XmlElementPath path = new XmlElementPath();
            path.AddElement(new QualifiedName("foo", "http://foo.com"));

            fooChildElementCompletion = SchemaCompletion.GetChildElementCompletion(path);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:ElementRefAnnotationTestFixture.cs

示例11: FixtureInit

        public override void FixtureInit()
        {
            XmlElementPath path = new XmlElementPath();
            path.AddElement(new QualifiedName("note", "http://www.w3schools.com"));

            noteChildElements = SchemaCompletion.GetChildElementCompletion(path);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:ChoiceTestFixture.cs

示例12: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("root", "http://foo"));
			path.AddElement(new QualifiedName("bar", "http://foo"));
			barElementAttributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:MissingSchemaElementTestFixture.cs

示例13: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("foo", "http://foo.com"));
			
			attributeCompletionItems = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:SimpleContentWithAttributeTestFixture.cs

示例14: FixtureInit

        public override void FixtureInit()
        {
            XmlElementPath path = new XmlElementPath();
            path.AddElement(new QualifiedName("html", "http://foo/xhtml"));

            htmlChildElements = SchemaCompletion.GetChildElementCompletion(path);
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:DuplicateElementTestFixture.cs

示例15: FixtureInit

		public override void FixtureInit()
		{
			XmlElementPath path = new XmlElementPath();
			path.AddElement(new QualifiedName("project", "http://nant.sf.net//nant-0.84.xsd"));
			path.AddElement(new QualifiedName("attrib", "http://nant.sf.net//nant-0.84.xsd"));
			
			attributes = SchemaCompletion.GetAttributeCompletion(path);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:ChildElementAttributesTestFixture.cs


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