Beispiel #1
0
        public override Task <bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context, CancellationToken cancellationToken)
        {
            switch (scope)
            {
            case TextBufferCodeCleanUpScope textBufferScope:
                return(FixTextBufferAsync(textBufferScope, context, cancellationToken));

            case IVsHierarchyCodeCleanupScope hierarchyContentScope:
                return(FixHierarchyContentAsync(hierarchyContentScope, context, cancellationToken));

            default:
                return(Task.FromResult(false));
            }
        }
Beispiel #2
0
 public Task <bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context)
 => scope switch
 {
Beispiel #3
0
 public abstract Task <bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context, CancellationToken cancellationToken);
Beispiel #4
0
 public abstract Task <bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context);
Beispiel #5
0
 public virtual Task <bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context, CancellationToken _)
 {
     // cancellation token will be removed in next API update
     return(FixAsync(scope, context));
 }