2 writes to Span
dotnet (2)
FileLevelDirectiveHelpers.cs (2)
124Span = span, 147Span = span,
16 references to Span
dotnet (16)
Commands\Run\FileBasedAppSourceEditor.cs (4)
94return new TextChange(toReplace.Info.Span, newText: directive.ToString() + NewLine); 122var span = new TextSpan(start: addAfter.Info.Span.End, length: 0); 231var span = directive.Info.Span; 247var startBeforeWhiteSpace = directive.Info.Span.Start - directive.Info.LeadingWhiteSpace.TotalLength;
Commands\Run\VirtualProjectBuildingCommand.cs (2)
1455Debug.Assert(directives.OrderBy(d => d.Info.Span.Start).SequenceEqual(directives), "Directives should be ordered by source location."); 1460text = text.Replace(directive.Info.Span, string.Empty);
FileLevelDirectiveHelpers.cs (10)
160diagnostics.AddError(sourceFile, context.Info.Span, FileBasedProgramsResources.QuoteInDirective); 170diagnostics.AddError(sourceFile, directive.Info.Span, string.Format(FileBasedProgramsResources.DuplicateDirective, typeAndName)); 312var other => context.Diagnostics.AddError<Named>(context.SourceFile, context.Info.Span, string.Format(FileBasedProgramsResources.UnrecognizedDirective, other)), 324return context.Diagnostics.AddError<(string, string?)?>(context.SourceFile, context.Info.Span, string.Format(FileBasedProgramsResources.MissingDirectiveName, directiveKind)); 330return context.Diagnostics.AddError<(string, string?)?>(context.SourceFile, context.Info.Span, string.Format(FileBasedProgramsResources.InvalidDirectiveName, directiveKind, separator)); 405return context.Diagnostics.AddError<Property?>(context.SourceFile, context.Info.Span, FileBasedProgramsResources.PropertyDirectiveMissingParts); 414return context.Diagnostics.AddError<Property?>(context.SourceFile, context.Info.Span, string.Format(FileBasedProgramsResources.PropertyDirectiveInvalidName, ex.Message), ex); 420context.Diagnostics.AddError(context.SourceFile, context.Info.Span, FileBasedProgramsResources.StaticGraphRestoreNotSupported); 468return context.Diagnostics.AddError<Project?>(context.SourceFile, context.Info.Span, string.Format(FileBasedProgramsResources.MissingDirectiveName, directiveKind)); 494context.Diagnostics.AddError(context.SourceFile, context.Info.Span, string.Format(FileBasedProgramsResources.InvalidProjectDirective, e.Message), e);