private static ICssCompletionListEntry GetSchemaEntry(ICssSchemaInstance schema, CssCompletionContext context, CssCompletionEntry entry)
        {
            switch (context.ContextType)
            {
                case CssCompletionContextType.AtDirectiveName:
                    return schema.GetAtDirective(entry.DisplayText);

                case CssCompletionContextType.PropertyName:
                    return schema.GetProperty(entry.DisplayText);

                case CssCompletionContextType.PseudoClassOrElement:
                    return schema.GetPseudo(entry.DisplayText);
            }

            return null;
        }
Beispiel #2
0
        private static ICssCompletionListEntry GetSchemaEntry(ICssSchemaInstance schema, CssCompletionContext context, CssCompletionEntry entry)
        {
            switch (context.ContextType)
            {
            case CssCompletionContextType.AtDirectiveName:
                return(schema.GetAtDirective(entry.DisplayText));

            case CssCompletionContextType.PropertyName:
                return(schema.GetProperty(entry.DisplayText));

            case CssCompletionContextType.PseudoClassOrElement:
                return(schema.GetPseudo(entry.DisplayText));
            }

            return(null);
        }