本文整理汇总了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;
}
}
示例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);
}
示例4: CanGetCompletionItemsUsedAsShowCompletionMethodParameters
public void CanGetCompletionItemsUsedAsShowCompletionMethodParameters()
{
XmlCompletionItemCollection list = new XmlCompletionItemCollection();
list.Add(new XmlCompletionItem("a"));
editor.ShowCompletionWindow(list);
Assert.AreSame(list, editor.CompletionItemsDisplayed);
}
示例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);
}
示例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);
}
示例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());
}
示例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());
}
示例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);
}
示例10: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("foo", "http://foo.com"));
fooChildElementCompletion = SchemaCompletion.GetChildElementCompletion(path);
}
示例11: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("note", "http://www.w3schools.com"));
noteChildElements = SchemaCompletion.GetChildElementCompletion(path);
}
示例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);
}
示例13: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("foo", "http://foo.com"));
attributeCompletionItems = SchemaCompletion.GetAttributeCompletion(path);
}
示例14: FixtureInit
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("html", "http://foo/xhtml"));
htmlChildElements = SchemaCompletion.GetChildElementCompletion(path);
}
示例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);
}