3 writes to Usings
Microsoft.CodeAnalysis.CSharp (3)
CSharpCompilationOptions.cs (3)
225this.Usings = usings.AsImmutableOrEmpty(); 375return new CSharpCompilationOptions(this) { Usings = usings }; 379new CSharpCompilationOptions(this) { Usings = usings.AsImmutableOrEmpty() };
21 references to Usings
Microsoft.CodeAnalysis.CSharp (14)
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (1)
29var usings = compilation.Options.Usings;
Compilation\CSharpDeterministicKeyBuilder.cs (1)
33foreach (var name in csharpOptions.Usings)
CSharpCompilationOptions.cs (12)
236usings: other.Usings, 274internal override ImmutableArray<string> GetImports() => Usings; 370if (this.Usings == usings) 710if (Usings != null && Usings.Any(static u => !u.IsValidClrNamespaceName())) 712builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(Usings), Usings.Where(u => !u.IsValidClrNamespaceName()).First() ?? "null")); 744(this.Usings == null ? other.Usings == null : this.Usings.SequenceEqual(other.Usings, StringComparer.Ordinal) && 757Hash.Combine(Hash.CombineValues(this.Usings, StringComparer.Ordinal),
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
CommandLineRunnerTests.cs (1)
700}, arguments.CompilationOptions.Usings.AsEnumerable());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\CSharpCompilationOptionsTests.cs (5)
113TestProperty((old, value) => old.WithUsings(value), opt => opt.Usings, ImmutableArray.Create("A", "B")); 203var actual1 = new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithUsings(new[] { "A", "B" }).Usings; 206var actual2 = new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithUsings(Enumerable.Repeat("A", 1)).Usings; 209Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithUsings("A", "B").WithUsings(null).Usings.Count()); 210Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithUsings("A", "B").WithUsings((string[])null).Usings.Count());
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Serialization\CSharpOptionsSerializationService.cs (1)
31writer.WriteArray(csharpOptions.Usings, static (w, u) => w.WriteString(u));