Binder\Binder_Expressions.cs (5)
1489internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false)
1499internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false)
9226internal static int? InferConstantIndexFromSystemIndex(CSharpCompilation compilation, BoundExpression convertedIndex, int length, out SyntaxNode location)
10881static bool checkConstraints(CSharpCompilation compilation, ConversionsBase conversions, NamedTypeSymbol delegateType, ImmutableArray<TypeWithAnnotations> typeArguments)
11031internal static bool MethodOrLambdaRequiresValue(Symbol symbol, CSharpCompilation compilation)
Binder\Binder_Symbols.cs (11)
748internal static void ReportMissingTupleElementNamesAttributesIfNeeded(CSharpCompilation compilation, Location location, BindingDiagnosticBag diagnostics)
1636internal static NamedTypeSymbol GetSpecialType(CSharpCompilation compilation, SpecialType typeId, SyntaxNode node, BindingDiagnosticBag diagnostics)
1644internal static NamedTypeSymbol GetSpecialType(CSharpCompilation compilation, SpecialType typeId, Location location, BindingDiagnosticBag diagnostics)
1661internal static Symbol GetSpecialTypeMember(CSharpCompilation compilation, SpecialMember member, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
1669internal static bool TryGetSpecialTypeMember<TSymbol>(CSharpCompilation compilation, SpecialMember specialMember, SyntaxNode syntax, BindingDiagnosticBag diagnostics, out TSymbol symbol, bool isOptional = false)
1768internal static NamedTypeSymbol GetWellKnownType(CSharpCompilation compilation, WellKnownType type, BindingDiagnosticBag diagnostics, SyntaxNode node)
1773internal static NamedTypeSymbol GetWellKnownType(CSharpCompilation compilation, WellKnownType type, BindingDiagnosticBag diagnostics, Location location)
1802internal static Symbol GetWellKnownTypeMember(CSharpCompilation compilation, WellKnownMember member, BindingDiagnosticBag diagnostics, Location location = null, SyntaxNode syntax = null, bool isOptional = false)
1816internal static Symbol GetWellKnownTypeMember(CSharpCompilation compilation, WellKnownMember member, out UseSiteInfo<AssemblySymbol> useSiteInfo, bool isOptional = false)
2460var compilation = this.Compilation;
2502private static BestSymbolLocation GetLocation(CSharpCompilation compilation, Symbol symbol)
Binder\ForEachLoopBinder.cs (3)
1788TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo,
1811private static void GetIEnumerableOfT(ImmutableArray<NamedTypeSymbol> interfaces, bool isAsync, CSharpCompilation compilation, ref NamedTypeSymbol result, ref bool foundMultiple)
1838internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation)
Binder\Semantics\Conversions\ConversionsBase.cs (8)
92protected abstract CSharpCompilation? Compilation { get; }
1467private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree)
1588private static LambdaConversionResult IsAnonymousFunctionCompatibleWithExpressionTree(UnboundLambda anonymousFunction, NamedTypeSymbol type, CSharpCompilation compilation)
1626public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation)
1643private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination, CSharpCompilation compilation)
1656internal static CollectionExpressionTypeKind GetCollectionExpressionTypeKind(CSharpCompilation compilation, TypeSymbol destination, out TypeWithAnnotations elementType)
1700static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface)
1708internal static bool IsSpanOrListType(CSharpCompilation compilation, TypeSymbol targetType, WellKnownType spanType, [NotNullWhen(true)] out TypeWithAnnotations elementType)
Compilation\CSharpCompilation.cs (43)
351public static CSharpCompilation Create(
371public static CSharpCompilation CreateScriptCompilation(
376CSharpCompilation? previousScriptCompilation = null,
394private static CSharpCompilation Create(
399CSharpCompilation? previousSubmission,
418var compilation = new CSharpCompilation(
450CSharpCompilation? previousSubmission,
467CSharpCompilation? previousSubmission,
551public new CSharpCompilation Clone()
567private CSharpCompilation Update(
589public new CSharpCompilation WithAssemblyName(string? assemblyName)
613/// The new <see cref="CSharpCompilation"/> will query the given <see cref="MetadataReference"/> for the underlying
620public new CSharpCompilation WithReferences(IEnumerable<MetadataReference>? references)
642public new CSharpCompilation WithReferences(params MetadataReference[] references)
650public CSharpCompilation WithOptions(CSharpCompilationOptions options)
682public CSharpCompilation WithScriptCompilationInfo(CSharpScriptCompilationInfo? info)
762internal CSharpCompilation? PreviousSubmission => ScriptCompilationInfo?.PreviousScriptCompilation;
831public new CSharpCompilation AddSyntaxTrees(params SyntaxTree[] trees)
839public new CSharpCompilation AddSyntaxTrees(IEnumerable<SyntaxTree> trees)
903public new CSharpCompilation RemoveSyntaxTrees(params SyntaxTree[] trees)
912public new CSharpCompilation RemoveSyntaxTrees(IEnumerable<SyntaxTree> trees)
965public new CSharpCompilation RemoveAllSyntaxTrees()
977public new CSharpCompilation ReplaceSyntaxTree(SyntaxTree oldTree, SyntaxTree? newTree)
1151internal bool ReferenceManagerEquals(CSharpCompilation other)
1239public new CSharpCompilation AddReferences(params MetadataReference[] references)
1241return (CSharpCompilation)base.AddReferences(references);
1247public new CSharpCompilation AddReferences(IEnumerable<MetadataReference> references)
1249return (CSharpCompilation)base.AddReferences(references);
1255public new CSharpCompilation RemoveReferences(params MetadataReference[] references)
1257return (CSharpCompilation)base.RemoveReferences(references);
1263public new CSharpCompilation RemoveReferences(IEnumerable<MetadataReference> references)
1265return (CSharpCompilation)base.RemoveReferences(references);
1271public new CSharpCompilation RemoveAllReferences()
1273return (CSharpCompilation)base.RemoveAllReferences();
1279public new CSharpCompilation ReplaceReference(MetadataReference oldReference, MetadataReference newReference)
1281return (CSharpCompilation)base.ReplaceReference(oldReference, newReference);
1568var previousSubmission = PreviousSubmission;
1634var previous = this.PreviousSubmission;
4084static CustomModifier getCustomModifierForType(INamedTypeSymbol type, CSharpCompilation @this, int index)
4812private readonly CSharpCompilation _compilation;
4819CSharpCompilation compilation, SymbolFilter filter, CancellationToken cancellationToken)
5003CSharpCompilation compilation, SymbolFilter filter, Func<string, bool> predicate, CancellationToken cancellationToken)
5026CSharpCompilation compilation, SymbolFilter filter, string name, CancellationToken cancellationToken)
Compiler\MethodCompiler.cs (7)
31private readonly CSharpCompilation _compilation;
87internal MethodCompiler(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuiltOpt, bool emittingPdb, bool hasDeclarationErrors, bool emitMethodBodies,
110CSharpCompilation compilation,
221private static MethodSymbol GetEntryPoint(CSharpCompilation compilation, PEModuleBuilder moduleBeingBuilt, bool hasDeclarationErrors, bool emitMethodBodies, BindingDiagnosticBag diagnostics, CancellationToken cancellationToken)
342private static void WarnUnusedFields(CSharpCompilation compilation, BindingDiagnosticBag diagnostics, CancellationToken cancellationToken)
1800var compilation = bodyBinder.Compilation;
2340var compilation = method.DeclaringCompilation;
FlowAnalysis\DataFlowsInWalker.cs (2)
27private DataFlowsInWalker(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion,
33internal static HashSet<Symbol> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion,
FlowAnalysis\DataFlowsOutWalker.cs (2)
27private DataFlowsOutWalker(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion, HashSet<Symbol> unassignedVariables, ImmutableArray<ISymbol> dataFlowsIn)
33internal static HashSet<Symbol> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion, HashSet<Symbol> unassignedVariables, ImmutableArray<ISymbol> dataFlowsIn)
FlowAnalysis\NullableWalker.cs (16)
448CSharpCompilation compilation,
1335CSharpCompilation compilation,
1362CSharpCompilation compilation,
1403internal static VariableState? GetAfterInitializersState(CSharpCompilation compilation, Symbol? symbol, BoundNode constructorBody)
1421internal static VariableState? GetAfterInitializersState(CSharpCompilation compilation, MethodSymbol method, BoundNode nodeToAnalyze, BoundNode? constructorBody, BindingDiagnosticBag diagnostics)
1472CSharpCompilation compilation,
1487CSharpCompilation compilation,
1503CSharpCompilation compilation,
1548static bool isNullableAnalysisEnabledAnywhere(CSharpCompilation compilation)
1623private static bool HasRequiredLanguageVersion(CSharpCompilation compilation)
1632internal static bool NeedsAnalysis(CSharpCompilation compilation, SyntaxNode syntaxNode)
1647var compilation = binder.Compilation;
1680CSharpCompilation compilation,
1718CSharpCompilation compilation,
2360static bool allowUnconstrainedTypeParameterAnnotations(CSharpCompilation compilation)
6356static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember)
FlowAnalysis\ReadWriteWalker.cs (2)
22CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion, HashSet<PrefixUnaryExpressionSyntax> unassignedVariableAddressOfSyntaxes,
70private ReadWriteWalker(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion,
Lowering\LocalRewriter\LocalRewriter.cs (6)
24private readonly CSharpCompilation _compilation;
56CSharpCompilation compilation,
85CSharpCompilation compilation,
616/// Recommendation: Do not use, use <see cref="TryGetSpecialTypeMethod(SyntaxNode, SpecialMember, CSharpCompilation, BindingDiagnosticBag, out MethodSymbol, bool)"/> instead!
619private static MethodSymbol UnsafeGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember specialMember, CSharpCompilation compilation, BindingDiagnosticBag diagnostics)
641private static bool TryGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember specialMember, CSharpCompilation compilation, BindingDiagnosticBag diagnostics, out MethodSymbol method, bool isOptional = false)
Symbols\Attributes\AttributeData.cs (5)
99internal bool IsSecurityAttribute(CSharpCompilation compilation)
215internal void DecodeSecurityAttribute<T>(Symbol targetSymbol, CSharpCompilation compilation, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments)
241internal static void DecodeSkipLocalsInitAttribute<T>(CSharpCompilation compilation, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments)
339private DeclarativeSecurityAction DecodeSecurityAttributeAction(Symbol targetSymbol, CSharpCompilation compilation, AttributeSyntax? nodeOpt, out bool hasErrors, BindingDiagnosticBag diagnostics)
508private string? DecodePermissionSetAttribute(CSharpCompilation compilation, AttributeSyntax? nodeOpt, BindingDiagnosticBag diagnostics)
Symbols\ConstraintsHelper.cs (10)
77CSharpCompilation currentCompilation,
134CSharpCompilation currentCompilation,
490CSharpCompilation compilation,
503CSharpCompilation compilation,
526public readonly CSharpCompilation CurrentCompilation;
533public CheckConstraintsArgs(CSharpCompilation currentCompilation, ConversionsBase conversions, Location location, BindingDiagnosticBag diagnostics) :
538public CheckConstraintsArgs(CSharpCompilation currentCompilation, ConversionsBase conversions, bool includeNullability, Location location, BindingDiagnosticBag diagnostics) :
543public CheckConstraintsArgs(CSharpCompilation currentCompilation, ConversionsBase conversions, bool includeNullability, Location location, BindingDiagnosticBag diagnostics, CompoundUseSiteInfo<AssemblySymbol> template)
561public static CheckConstraintsArgsBoxed Allocate(CSharpCompilation currentCompilation, ConversionsBase conversions, Location location, BindingDiagnosticBag diagnostics)
569public static CheckConstraintsArgsBoxed Allocate(CSharpCompilation currentCompilation, ConversionsBase conversions, bool includeNullability, Location location, BindingDiagnosticBag diagnostics)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (9)
108static CallingConvention getCallingConvention(CSharpCompilation compilation, FunctionPointerCallingConventionSyntax? callingConventionSyntax, ArrayBuilder<CustomModifier> customModifiers, BindingDiagnosticBag diagnostics)
189static CallingConvention handleSingleConvention(FunctionPointerUnmanagedCallingConventionSyntax specifier, CSharpCompilation compilation, ArrayBuilder<CustomModifier> customModifiers, BindingDiagnosticBag diagnostics)
200static CustomModifier? handleIndividualUnrecognizedSpecifier(FunctionPointerUnmanagedCallingConventionSyntax specifier, CSharpCompilation compilation, BindingDiagnosticBag diagnostics)
229static void checkUnmanagedSupport(CSharpCompilation compilation, Location errorLocation, BindingDiagnosticBag diagnostics)
251CSharpCompilation compilation)
274CSharpCompilation compilation)
310private static CustomModifier? GetCustomModifierForRefKind(RefKind refKind, CSharpCompilation compilation)
494CSharpCompilation compilation)
513static ImmutableArray<CustomModifier> getCustomModifierArrayForRefKind(RefKind refKind, CSharpCompilation compilation)
Symbols\Source\ParameterHelpers.cs (9)
227internal static void EnsureRefKindAttributesExist(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
239private static void EnsureRefKindAttributesExist(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
268internal static void EnsureParamCollectionAttributeExistsAndModifyCompilation(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics)
282internal static void EnsureNativeIntegerAttributeExists(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
299private static void EnsureNativeIntegerAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
349internal static void EnsureScopedRefAttributeExists(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
361private static void EnsureScopedRefAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
384internal static void EnsureNullableAttributeExists(CSharpCompilation? compilation, Symbol container, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation)
396private static void EnsureNullableAttributeExists(CSharpCompilation compilation, Symbol container, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
Symbols\Tuples\TupleTypeSymbol.cs (7)
35CSharpCompilation compilation,
74static NamedTypeSymbol getTupleUnderlyingType(ImmutableArray<TypeWithAnnotations> elementTypes, CSharpSyntaxNode? syntax, CSharpCompilation compilation, BindingDiagnosticBag? diagnostics)
261internal static void VerifyTupleTypePresent(int cardinality, CSharpSyntaxNode? syntax, CSharpCompilation compilation, BindingDiagnosticBag diagnostics)
524return CSharpCompilation.GetRuntimeMember(members, relativeDescriptor, CSharpCompilation.SpecialMembersSignatureComparer.Instance,
815return CSharpCompilation.GetRuntimeMember(members, relativeDescriptor, CSharpCompilation.SpecialMembersSignatureComparer.Instance,
Symbols\TypeSymbolExtensions.cs (14)
238public static bool IsValidAttributeParameterType(this TypeSymbol type, CSharpCompilation compilation)
249public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation)
1828internal static bool IsNonGenericTaskType(this TypeSymbol type, CSharpCompilation compilation)
1846internal static bool IsGenericTaskType(this TypeSymbol type, CSharpCompilation compilation)
1859internal static bool IsIAsyncEnumerableType(this TypeSymbol type, CSharpCompilation compilation)
1869internal static bool IsIAsyncEnumeratorType(this TypeSymbol type, CSharpCompilation compilation)
1906internal static TypeSymbol NormalizeTaskTypes(this TypeSymbol type, CSharpCompilation compilation)
1915private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeSymbol type)
1952private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeWithAnnotations typeWithAnnotations)
1963private static bool NormalizeTaskTypesInNamedType(CSharpCompilation compilation, ref NamedTypeSymbol type)
2019private static bool NormalizeTaskTypesInArray(CSharpCompilation compilation, ref ArrayTypeSymbol arrayType)
2030private static bool NormalizeTaskTypesInPointer(CSharpCompilation compilation, ref PointerTypeSymbol pointerType)
2042private static bool NormalizeTaskTypesInFunctionPointer(CSharpCompilation compilation, ref FunctionPointerTypeSymbol funcPtrType)
2090var compilation = declaringSymbol.DeclaringCompilation;