public static List<IHtmlSchema> GetSchemas() { HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema html = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); var schemas = mng.CustomAttributePrefixes.SelectMany(p => mng.GetSupplementalSchemas(p)).ToList(); schemas.Insert(0, html); return schemas; }
private static IEnumerable<ICssCompletionListEntry> GetListEntriesCache() { HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); foreach (var element in schema.GetTopLevelElements()) { if (!_ignore.Contains(element.Name)) yield return new CompletionListEntry(element.Name); } }
private static IEnumerable <string> BuildCache() { yield return("*"); HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); foreach (var element in schema.GetTopLevelElements()) { yield return(element.Name); } }
private static IEnumerable<string> BuildCache() { yield return "*"; HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); foreach (var element in schema.GetTopLevelElements()) { yield return element.Name; } }
public IEnumerable<ICssCompletionListEntry> GetListEntries(CssCompletionContext context) { HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); var tag = context.ContextItem.FindType<SimpleSelector>(); if (tag != null && tag.Name != null) { return KnownTagName(schema, tag.Name.Text); } return UnknownTagName(schema); }
public static IEnumerable<string> GetAttributeValue(string elementName, string attributeName) { HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); IHtmlElementInfo element = schema.GetElementInfo(elementName); if (element != null) { IHtmlAttributeInfo attribute = element.GetAttribute(attributeName); if (attribute != null) { foreach (IHtmlAttributeValueInfo value in attribute.GetValues()) { yield return value.Value; } } } }
public IEnumerable <ICssCompletionListEntry> GetListEntries(CssCompletionContext context) { HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); var tag = context.ContextItem.FindType <SimpleSelector>(); var attr = context.ContextItem as AttributeSelector; if (tag != null && tag.Name != null && attr != null && attr.AttributeName != null) { return(KnownTagName(schema, tag.Name.Text, attr.AttributeName.Text)); } else if (attr != null && attr.AttributeName != null) { return(UnknownTagName(schema, attr.AttributeName.Text)); } return(new List <ICssCompletionListEntry>()); }
public static IEnumerable <string> GetAttributeValue(string elementName, string attributeName) { HtmlSchemaManager mng = new HtmlSchemaManager(); IHtmlSchema schema = mng.GetSchema("http://schemas.microsoft.com/intellisense/html"); IHtmlElementInfo element = schema.GetElementInfo(elementName); if (element != null) { IHtmlAttributeInfo attribute = element.GetAttribute(attributeName); if (attribute != null) { foreach (IHtmlAttributeValueInfo value in attribute.GetValues()) { yield return(value.Value); } } } }