/// <summary> /// Constructor /// </summary> /// <param name="syntaxRoot">Syntax root</param> /// <param name="semanticModel">Semantic model</param> /// <param name="workspace">Workspace</param> /// <param name="roslynClassificationTypes">Colors</param> /// <param name="defaultColor">Default color if a token can't be classified or null to not use anything</param> /// <param name="cancellationToken">Cancellation token</param> public RoslynClassifier(SyntaxNode syntaxRoot, SemanticModel semanticModel, Workspace workspace, RoslynClassificationTypes2 roslynClassificationTypes, object defaultColor, CancellationToken cancellationToken) { this.syntaxRoot = syntaxRoot; this.semanticModel = semanticModel; this.workspace = workspace; this.roslynClassificationTypes = roslynClassificationTypes; this.defaultColor = defaultColor; this.cancellationToken = cancellationToken; }
/// <summary> /// Constructor /// </summary> /// <param name="syntaxRoot">Syntax root</param> /// <param name="semanticModel">Semantic model</param> /// <param name="workspace">Workspace</param> /// <param name="roslynClassificationTypes">Classification types</param> /// <param name="defaultClassificationType">Default classification type if a token can't be classified or null to not use anything</param> /// <param name="cancellationToken">Cancellation token</param> #pragma warning disable 0618 // Type or member is obsolete public RoslynClassifier(SyntaxNode syntaxRoot, SemanticModel semanticModel, Workspace workspace, RoslynClassificationTypes roslynClassificationTypes, IClassificationType defaultClassificationType, CancellationToken cancellationToken) { #pragma warning restore 0618 // Type or member is obsolete this.syntaxRoot = syntaxRoot; this.semanticModel = semanticModel; this.workspace = workspace; this.roslynClassificationTypes = new RoslynClassificationTypes2(roslynClassificationTypes); this.defaultColor = defaultClassificationType; this.cancellationToken = cancellationToken; }