Esempio n. 1
0
            public static async Task RemoveWrittenFields(
                Document document,
                ConcurrentDictionary <IFieldSymbol, bool> writableFields,
                CancellationToken cancellationToken)
            {
                var scanner = new WriteUsagesScanner(
                    await document.GetSemanticModelAsync(cancellationToken),
                    writableFields);

                scanner.Visit(await document.GetSyntaxRootAsync(cancellationToken));
            }
            public static async Task RemoveWrittenFields(
                Document document,
                ConcurrentDictionary <IFieldSymbol, bool> writableFields,
                CancellationToken cancellationToken)
            {
                if (document.Project.Language != LanguageNames.CSharp)
                {
                    return;
                }

                var scanner = new WriteUsagesScanner(
                    await document.GetSemanticModelAsync(cancellationToken),
                    writableFields);

                scanner.Visit(await document.GetSyntaxRootAsync(cancellationToken));
            }
 public static async Task RemoveWrittenFields(
     Document document,
     ConcurrentDictionary<IFieldSymbol, bool> writableFields,
     CancellationToken cancellationToken)
 {
     var scanner = new WriteUsagesScanner(
         await document.GetSemanticModelAsync(cancellationToken),
         writableFields);
     scanner.Visit(await document.GetSyntaxRootAsync(cancellationToken));
 }