2 instantiations of SourceAssemblySymbol
Microsoft.CodeAnalysis.CSharp (2)
Symbols\ReferenceManager.cs (2)
306
var assemblySymbol = new
SourceAssemblySymbol
(compilation, this.SimpleAssemblyName, moduleName, this.ReferencedModules);
437
var assemblySymbol = new
SourceAssemblySymbol
(compilation, SimpleAssemblyName, compilation.MakeSourceModuleName(), netModules: modules);
201 references to SourceAssemblySymbol
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_Attributes.cs (2)
551
var
containingAssembly = fieldSymbol.ContainingAssembly as
SourceAssemblySymbol
;
Compilation\CSharpCompilation.cs (4)
101
/// The <see cref="
SourceAssemblySymbol
"/> for this compilation. Do not access directly, use Assembly property
106
private
SourceAssemblySymbol
? _lazyAssemblySymbol;
1267
internal
SourceAssemblySymbol
SourceAssembly
3088
var
sourceAssembly = SourceAssembly;
Compiler\ClsComplianceChecker.cs (1)
86
System.Diagnostics.Debug.Assert(symbol is
SourceAssemblySymbol
);
Compiler\MethodCompiler.cs (2)
332
SourceAssemblySymbol
assembly = (
SourceAssemblySymbol
)compilation.Assembly;
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (5)
32
SourceAssemblySymbol
sourceAssembly,
34
SourceAssemblySymbol
otherAssembly,
47
SourceAssemblySymbol
sourceAssembly,
287
private readonly
SourceAssemblySymbol
_sourceAssembly;
315
SourceAssemblySymbol
sourceAssembly,
Emitter\EditAndContinue\EmitHelpers.cs (1)
185
var
sourceAssembly = ((CSharpCompilation)previousGeneration.Compilation).SourceAssembly;
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (2)
31
SourceAssemblySymbol
sourceAssembly,
64
var
previousAssembly = ((CSharpCompilation)previousGeneration.Compilation).SourceAssembly;
Emitter\Model\PEAssemblyBuilder.cs (3)
23
private readonly
SourceAssemblySymbol
_sourceAssembly;
66
SourceAssemblySymbol
sourceAssembly,
574
SourceAssemblySymbol
sourceAssembly,
Emitter\Model\PEModuleBuilder.cs (3)
614
SourceAssemblySymbol
sourceAssembly = SourceModule.ContainingSourceAssembly;
636
internal static HashSet<NamedTypeSymbol> GetForwardedTypes(
SourceAssemblySymbol
sourceAssembly, ArrayBuilder<Cci.ExportedType>? builder)
652
var
sourceAssembly = SourceModule.ContainingSourceAssembly;
Emitter\Model\SymbolAdapter.cs (2)
68
(this.Kind == SymbolKind.Assembly && this is
SourceAssemblySymbol
) ||
156
if (((
SourceAssemblySymbol
)this).IsIndexOfOmittedAssemblyAttribute(i))
FlowAnalysis\DefiniteAssignment.cs (4)
127
private readonly
SourceAssemblySymbol
? _sourceAssembly;
233
private static
SourceAssemblySymbol
? GetSourceAssembly(
250
return member.ContainingAssembly as
SourceAssemblySymbol
;
2477
if (!(type.ContainingAssembly is
SourceAssemblySymbol
assembly))
FlowAnalysis\EmptyStructTypeCache.cs (2)
32
private readonly
SourceAssemblySymbol
_sourceAssembly;
258
private static bool IsAccessibleInAssembly(Symbol symbol,
SourceAssemblySymbol
assembly)
Symbols\AssemblySymbol.cs (2)
903
Debug.Assert(this is
SourceAssemblySymbol
,
921
Debug.Assert(!(this is
SourceAssemblySymbol
&& assembly.IsMissing)); // Non-source assemblies can have missing references
Symbols\Attributes\AttributeData.cs (2)
689
Debug.Assert(target is
SourceAssemblySymbol
|| target.ContainingAssembly is
SourceAssemblySymbol
);
Symbols\Attributes\RetargetingAttributeData.cs (2)
36
var
underlyingAssembly = (
SourceAssemblySymbol
)retargetingAssembly.UnderlyingAssembly;
Symbols\Compilation_UsedAssemblies.cs (1)
166
case
SourceAssemblySymbol
sourceAssembly:
Symbols\Metadata\PE\MetadataDecoder.cs (2)
388
Debug.Assert(!(assembly is
SourceAssemblySymbol
) || !((
SourceAssemblySymbol
)assembly).SourceModule.MightContainNoPiaLocalTypes());
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
129
internal PEModuleSymbol(
SourceAssemblySymbol
assemblySymbol, PEModule module, MetadataImportOptions importOptions, int ordinal)
Symbols\MissingModuleSymbol.cs (1)
163
internal override void SetReferences(ModuleReferences<AssemblySymbol> moduleReferences,
SourceAssemblySymbol
originatingSourceAssemblyDebugOnly)
Symbols\ModuleSymbol.cs (1)
282
internal abstract void SetReferences(ModuleReferences<AssemblySymbol> moduleReferences,
SourceAssemblySymbol
originatingSourceAssemblyDebugOnly = null);
Symbols\NonMissingModuleSymbol.cs (1)
154
internal override void SetReferences(ModuleReferences<AssemblySymbol> moduleReferences,
SourceAssemblySymbol
originatingSourceAssemblyDebugOnly = null)
Symbols\PublicModel\NonSourceAssemblySymbol.cs (1)
18
Debug.Assert(!(underlying is Symbols.
SourceAssemblySymbol
));
Symbols\PublicModel\SourceAssemblySymbol.cs (2)
13
private readonly Symbols.
SourceAssemblySymbol
_underlying;
15
public SourceAssemblySymbol(Symbols.
SourceAssemblySymbol
underlying)
Symbols\ReferenceManager.cs (8)
144
if (candidateAssembly is
SourceAssemblySymbol
)
306
var
assemblySymbol = new SourceAssemblySymbol(compilation, this.SimpleAssemblyName, moduleName, this.ReferencedModules);
437
var
assemblySymbol = new SourceAssemblySymbol(compilation, SimpleAssemblyName, compilation.MakeSourceModuleName(), netModules: modules);
539
SourceAssemblySymbol
sourceAssembly,
644
SourceAssemblySymbol
sourceAssemblyDebugOnly)
721
SourceAssemblySymbol
sourceAssemblyDebugOnly)
761
SourceAssemblySymbol
sourceAssembly,
1148
asm = candidateAssembly as
SourceAssemblySymbol
;
Symbols\Retargeting\RetargetingAssemblySymbol.cs (4)
46
private readonly
SourceAssemblySymbol
_underlyingAssembly;
102
public RetargetingAssemblySymbol(
SourceAssemblySymbol
underlyingAssembly, bool isLinked)
131
/// The underlying <see cref="
SourceAssemblySymbol
"/>.
133
public
SourceAssemblySymbol
UnderlyingAssembly
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
188
internal override void SetReferences(ModuleReferences<AssemblySymbol> moduleReferences,
SourceAssemblySymbol
originatingSourceAssemblyDebugOnly)
Symbols\Source\SourceMemberContainerSymbol.cs (2)
694
var
assembly = (
SourceAssemblySymbol
)ContainingAssembly;
Symbols\Source\SourceModuleSymbol.cs (6)
31
private readonly
SourceAssemblySymbol
_assemblySymbol;
53
SourceAssemblySymbol
assemblySymbol,
401
internal
SourceAssemblySymbol
ContainingSourceAssembly
464
var mergedAttributes = ((
SourceAssemblySymbol
)this.ContainingAssembly).GetAttributeDeclarations();
608
CommonAssemblyWellKnownAttributeData<NamedTypeSymbol> decodedData = ((
SourceAssemblySymbol
)this.ContainingAssembly).GetSourceDecodedWellKnownAttributeData();
617
CommonAssemblyWellKnownAttributeData<NamedTypeSymbol> decodedData = ((
SourceAssemblySymbol
)this.ContainingAssembly).GetSourceDecodedWellKnownAttributeData();
Symbols\Symbol.cs (1)
201
Debug.Assert(!(this is
SourceAssemblySymbol
), "SourceAssemblySymbol must override DeclaringCompilation");
Symbols\Symbol_Attributes.cs (1)
432
this is
SourceAssemblySymbol
&&
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
CodeGen\CodeGenTests.cs (2)
13257
var
assembly = (
SourceAssemblySymbol
)compilation.Assembly;
Emit\CompilationEmitTests.cs (1)
2723
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)class1.ContainingAssembly, EmitOptions.Default,
Emit\EditAndContinue\AssemblyReferencesTests.cs (6)
303
((
SourceAssemblySymbol
)lib0.Assembly).lazyAssemblyIdentity = new AssemblyIdentity("Lib", version0);
307
((
SourceAssemblySymbol
)lib1.Assembly).lazyAssemblyIdentity = new AssemblyIdentity("Lib", version1);
311
((
SourceAssemblySymbol
)lib2.Assembly).lazyAssemblyIdentity = new AssemblyIdentity("Lib", version2);
387
((
SourceAssemblySymbol
)lib0.Assembly).lazyAssemblyIdentity = new AssemblyIdentity("Lib", new Version(1, 0, 2000, 1001));
391
((
SourceAssemblySymbol
)lib1.Assembly).lazyAssemblyIdentity = new AssemblyIdentity("Lib", new Version(1, 0, 2000, 1002));
395
((
SourceAssemblySymbol
)lib2.Assembly).lazyAssemblyIdentity = new AssemblyIdentity("Lib", new Version(1, 0, 2000, 1003));
Emit\EmitMetadataTests.cs (1)
1413
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)sourceType.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (23)
Attributes\AttributeTests.cs (1)
326
/// Looking up C explicitly after calling GetAttributes will cause <see cref="
SourceAssemblySymbol
.GetForwardedTypes"/> to use the cached attributes, rather that do partial binding
Attributes\AttributeTests_Assembly.cs (13)
145
Assert.Equal("1.2.3.4", ((
SourceAssemblySymbol
)other.Assembly).FileVersion);
155
Assert.Equal("1.2", ((
SourceAssemblySymbol
)other.Assembly).FileVersion);
165
Assert.Equal("65535.65535.65535.65535", ((
SourceAssemblySymbol
)other.Assembly).FileVersion);
268
Assert.Equal("One Hundred Years of Solitude", ((
SourceAssemblySymbol
)other.Assembly).Title);
278
Assert.Null(((
SourceAssemblySymbol
)other.Assembly).Title);
288
Assert.Equal("A classic of magical realist literature", ((
SourceAssemblySymbol
)other.Assembly).Description);
519
Assert.Equal("MossBrain", ((
SourceAssemblySymbol
)other.Assembly).Company);
525
Assert.Equal("微软", ((
SourceAssemblySymbol
)other.Assembly).Company);
535
Assert.Equal("Sound Cannon", ((
SourceAssemblySymbol
)other.Assembly).Product);
545
Assert.Equal("مايكروسوفت", ((
SourceAssemblySymbol
)other.Assembly).Copyright);
555
Assert.Equal("circle R", ((
SourceAssemblySymbol
)other.Assembly).Trademark);
561
Assert.Equal("", ((
SourceAssemblySymbol
)other.Assembly).Trademark);
571
Assert.Equal("1.2.3garbage", ((
SourceAssemblySymbol
)other.Assembly).InformationalVersion);
Attributes\AttributeTests_Security.cs (2)
43
var
sourceAssembly = (
SourceAssemblySymbol
)assembly;
Attributes\AttributeTests_WellKnownAttributes.cs (4)
298
var
sourceAssembly = assembly as
SourceAssemblySymbol
;
408
var
sourceAssembly = assembly as
SourceAssemblySymbol
;
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
1800
Assert.StartsWith("0024000004", ((
SourceAssemblySymbol
)comp.Assembly.Modules[1].ContainingAssembly).SignatureKey);
Attributes\WellKnownAttributesTestBase.cs (2)
74
SourceAssemblySymbol
sourceAssembly = assembly as
SourceAssemblySymbol
;
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (5)
Binders\PlaceholderLocalBinder.cs (1)
40
var
sourceAssembly = compilation.SourceAssembly;
CompilationContext.cs (1)
342
var
sourceAssembly = Compilation.SourceAssembly;
CSharpEESymbolProvider.cs (2)
18
private readonly
SourceAssemblySymbol
_sourceAssembly;
21
public CSharpEESymbolProvider(
SourceAssemblySymbol
sourceAssembly, PEModuleSymbol module, PEMethodSymbol method)
EEAssemblyBuilder.cs (1)
27
SourceAssemblySymbol
sourceAssembly,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (86)
Compilation\ReferenceManagerTests.cs (4)
1338
var
a1 = c1.SourceAssembly;
1342
var
a2 = c2.SourceAssembly;
1454
var
assembly1 = withCircularReference1.SourceAssembly;
1457
var
assembly2 = withCircularReference2.SourceAssembly;
Compilation\UsedAssembliesTests.cs (12)
398
verify<
SourceAssemblySymbol
>(source2, comp1.ToMetadataReference());
470
verify<
SourceAssemblySymbol
>(source2, comp1Ref);
485
verify<
SourceAssemblySymbol
>(source3, comp1Ref);
537
verify<
SourceAssemblySymbol
>(source2, comp0Ref, comp1Ref);
556
verify<
SourceAssemblySymbol
>(source3, comp0Ref, comp1Ref);
602
var comp2 = verify2<
SourceAssemblySymbol
>(source2, comp0Ref, comp1Ref);
620
verify3<
SourceAssemblySymbol
>(source3, comp0Ref, comp2Ref);
632
verify3<
SourceAssemblySymbol
>(source3, comp0ImageRef, comp2Ref);
654
verify3<
SourceAssemblySymbol
>(source3, comp2Ref);
1378
verify<
SourceAssemblySymbol
>(source2, comp1.ToMetadataReference());
1984
verify<
SourceAssemblySymbol
>(source2, comp1Ref);
2000
verify<
SourceAssemblySymbol
>(source3, comp1Ref);
DocumentationComments\DocumentationCommentIDTests.cs (1)
62
var
symbol = comp.SourceAssembly;
Symbols\CompilationCreationTests.cs (14)
114
var
cyclic1Asm = (
SourceAssemblySymbol
)tc1.Assembly;
2086
var
asm1_V1 = localC1_V1.SourceAssembly();
2108
var
asm1_V2 = localC1_V2.SourceAssembly();
2123
var
asm4_V1 = localC4_V1.SourceAssembly();
2138
var
asm4_V2 = localC4_V2.SourceAssembly();
2153
var
asm7 = c7.SourceAssembly();
2239
var
asm3 = c3.SourceAssembly();
2564
SourceAssemblySymbol
c1AsmSource = (
SourceAssemblySymbol
)c1.Assembly;
2569
SourceAssemblySymbol
c2AsmSource = (
SourceAssemblySymbol
)c2.Assembly;
2981
Assert.IsType<
SourceAssemblySymbol
>(sourceAssembly);
2994
Assert.IsType<
SourceAssemblySymbol
>(addedModuleAssembly);
Symbols\CovariantReturnTests.cs (1)
471
Assert.True(sourceAssembly is
SourceAssemblySymbol
);
Symbols\Retargeting\RetargetingTests.cs (33)
40
var
sourceAssembly = (
SourceAssemblySymbol
)sourceModule.ContainingAssembly;
111
var
sourceAssembly = (
SourceAssemblySymbol
)sourceModule.ContainingAssembly;
144
var
sourceAssembly = (
SourceAssemblySymbol
)sourceModule.ContainingAssembly;
178
var
sourceAssembly = (
SourceAssemblySymbol
)sourceModule.ContainingAssembly;
214
var
sourceAssembly = (
SourceAssemblySymbol
)sourceModule.ContainingAssembly;
342
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
379
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
411
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
439
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
465
var retargetingAssembly = new RetargetingAssemblySymbol((
SourceAssemblySymbol
)comp.Assembly, isLinked: false);
489
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
521
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
550
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
579
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
609
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
646
var
sourceAssembly = (
SourceAssemblySymbol
)comp.Assembly;
667
var
sourceAssembly = (
SourceAssemblySymbol
)compilation.Assembly;
Symbols\Source\BaseClassTests.cs (1)
1574
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
Symbols\Source\MethodTests.cs (6)
1682
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1726
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1773
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1827
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1968
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)classC.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
2012
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)classC.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
Symbols\Source\PropertyTests.cs (2)
2505
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
2543
var module = new PEAssemblyBuilder((
SourceAssemblySymbol
)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
Symbols\SymbolDistinguisherTests.cs (12)
38
var
sourceAssembly = comp.SourceAssembly;
80
var
sourceAssembly = comp.SourceAssembly;
101
var
sourceAssembly = comp.SourceAssembly;
120
var
sourceAssembly = comp.SourceAssembly;
142
var
sourceAssembly = comp.SourceAssembly;
161
var
sourceAssembly = comp.SourceAssembly;
185
var
sourceAssembly = comp.SourceAssembly;
211
var
sourceAssembly = comp.SourceAssembly;
236
var
sourceAssembly = comp.SourceAssembly;
261
var
sourceAssembly = comp.SourceAssembly;
283
var
sourceAssembly = comp.SourceAssembly;
300
var
sourceAssembly = comp.SourceAssembly;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
CompilingTestBase.cs (1)
30
(
SourceAssemblySymbol
)compilation.Assembly,
CSharpTestBase.cs (1)
1367
((
SourceAssemblySymbol
)c.Assembly).lazyAssemblyIdentity = identity;
Extensions.cs (4)
93
public static
SourceAssemblySymbol
SourceAssembly(this CSharpCompilation @this)
95
return (
SourceAssemblySymbol
)@this.Assembly;
138
var
thatSourceAssembly = that as
SourceAssemblySymbol
;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
2874
var retargetingAssembly = new RetargetingAssemblySymbol((
SourceAssemblySymbol
)comp.Assembly, isLinked: false);