/// <summary> /// Initializes a new instance of the <c>JsonSyntaxLanguage</c> class. /// </summary> public JsonSyntaxLanguage() : base("Json") { // Create a classification type provider and register its classification types var classificationTypeProvider = new JsonClassificationTypeProvider(); classificationTypeProvider.RegisterAll(); // Register an ILexer service that can tokenize text RegisterService<ILexer>(new JsonLexer(classificationTypeProvider)); // Register an ICodeDocumentTaggerProvider service that creates a token tagger for // each document using the language RegisterService(new JsonTokenTaggerProvider(classificationTypeProvider)); // Register an IExampleTextProvider service that provides example text RegisterService<IExampleTextProvider>(new JsonExampleTextProvider()); }
/// <summary> /// Initializes a new instance of the <c>JsonSyntaxLanguage</c> class. /// </summary> public JsonSyntaxLanguage() : base("Json") { // Create a classification type provider and register its classification types var classificationTypeProvider = new JsonClassificationTypeProvider(); classificationTypeProvider.RegisterAll(); // Register an ILexer service that can tokenize text RegisterService <ILexer>(new JsonLexer(classificationTypeProvider)); // Register an ICodeDocumentTaggerProvider service that creates a token tagger for // each document using the language RegisterService(new JsonTokenTaggerProvider(classificationTypeProvider)); // Register an IExampleTextProvider service that provides example text RegisterService <IExampleTextProvider>(new JsonExampleTextProvider()); }