Binder\Binder_Expressions.cs (5)
1492internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false)
1502internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false)
9227internal static int? InferConstantIndexFromSystemIndex(CSharpCompilation compilation, BoundExpression convertedIndex, int length, out SyntaxNode location)
10882static bool checkConstraints(CSharpCompilation compilation, ConversionsBase conversions, NamedTypeSymbol delegateType, ImmutableArray<TypeWithAnnotations> typeArguments)
11032internal static bool MethodOrLambdaRequiresValue(Symbol symbol, CSharpCompilation compilation)
Binder\Binder_Symbols.cs (11)
748internal static void ReportMissingTupleElementNamesAttributesIfNeeded(CSharpCompilation compilation, Location location, BindingDiagnosticBag diagnostics)
1654internal static NamedTypeSymbol GetSpecialType(CSharpCompilation compilation, SpecialType typeId, SyntaxNode node, BindingDiagnosticBag diagnostics)
1662internal static NamedTypeSymbol GetSpecialType(CSharpCompilation compilation, SpecialType typeId, Location location, BindingDiagnosticBag diagnostics)
1679internal static Symbol GetSpecialTypeMember(CSharpCompilation compilation, SpecialMember member, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
1687internal static bool TryGetSpecialTypeMember<TSymbol>(CSharpCompilation compilation, SpecialMember specialMember, SyntaxNode syntax, BindingDiagnosticBag diagnostics, out TSymbol symbol, bool isOptional = false)
1786internal static NamedTypeSymbol GetWellKnownType(CSharpCompilation compilation, WellKnownType type, BindingDiagnosticBag diagnostics, SyntaxNode node)
1791internal static NamedTypeSymbol GetWellKnownType(CSharpCompilation compilation, WellKnownType type, BindingDiagnosticBag diagnostics, Location location)
1820internal static Symbol GetWellKnownTypeMember(CSharpCompilation compilation, WellKnownMember member, BindingDiagnosticBag diagnostics, Location location = null, SyntaxNode syntax = null, bool isOptional = false)
1834internal static Symbol GetWellKnownTypeMember(CSharpCompilation compilation, WellKnownMember member, out UseSiteInfo<AssemblySymbol> useSiteInfo, bool isOptional = false)
2478var compilation = this.Compilation;
2520private 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)
356public static CSharpCompilation Create(
376public static CSharpCompilation CreateScriptCompilation(
381CSharpCompilation? previousScriptCompilation = null,
399private static CSharpCompilation Create(
404CSharpCompilation? previousSubmission,
423var compilation = new CSharpCompilation(
455CSharpCompilation? previousSubmission,
472CSharpCompilation? previousSubmission,
556public new CSharpCompilation Clone()
572private CSharpCompilation Update(
594public new CSharpCompilation WithAssemblyName(string? assemblyName)
618/// The new <see cref="CSharpCompilation"/> will query the given <see cref="MetadataReference"/> for the underlying
625public new CSharpCompilation WithReferences(IEnumerable<MetadataReference>? references)
647public new CSharpCompilation WithReferences(params MetadataReference[] references)
655public CSharpCompilation WithOptions(CSharpCompilationOptions options)
687public CSharpCompilation WithScriptCompilationInfo(CSharpScriptCompilationInfo? info)
767internal CSharpCompilation? PreviousSubmission => ScriptCompilationInfo?.PreviousScriptCompilation;
836public new CSharpCompilation AddSyntaxTrees(params SyntaxTree[] trees)
844public new CSharpCompilation AddSyntaxTrees(IEnumerable<SyntaxTree> trees)
908public new CSharpCompilation RemoveSyntaxTrees(params SyntaxTree[] trees)
917public new CSharpCompilation RemoveSyntaxTrees(IEnumerable<SyntaxTree> trees)
970public new CSharpCompilation RemoveAllSyntaxTrees()
982public new CSharpCompilation ReplaceSyntaxTree(SyntaxTree oldTree, SyntaxTree? newTree)
1156internal bool ReferenceManagerEquals(CSharpCompilation other)
1244public new CSharpCompilation AddReferences(params MetadataReference[] references)
1246return (CSharpCompilation)base.AddReferences(references);
1252public new CSharpCompilation AddReferences(IEnumerable<MetadataReference> references)
1254return (CSharpCompilation)base.AddReferences(references);
1260public new CSharpCompilation RemoveReferences(params MetadataReference[] references)
1262return (CSharpCompilation)base.RemoveReferences(references);
1268public new CSharpCompilation RemoveReferences(IEnumerable<MetadataReference> references)
1270return (CSharpCompilation)base.RemoveReferences(references);
1276public new CSharpCompilation RemoveAllReferences()
1278return (CSharpCompilation)base.RemoveAllReferences();
1284public new CSharpCompilation ReplaceReference(MetadataReference oldReference, MetadataReference newReference)
1286return (CSharpCompilation)base.ReplaceReference(oldReference, newReference);
1573var previousSubmission = PreviousSubmission;
1639var previous = this.PreviousSubmission;
4109static CustomModifier getCustomModifierForType(INamedTypeSymbol type, CSharpCompilation @this, int index)
4837private readonly CSharpCompilation _compilation;
4844CSharpCompilation compilation, SymbolFilter filter, CancellationToken cancellationToken)
5028CSharpCompilation compilation, SymbolFilter filter, Func<string, bool> predicate, CancellationToken cancellationToken)
5051CSharpCompilation 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,
1396CSharpCompilation compilation,
1423CSharpCompilation compilation,
1464internal static VariableState? GetAfterInitializersState(CSharpCompilation compilation, Symbol? symbol, BoundNode constructorBody)
1482internal static VariableState? GetAfterInitializersState(CSharpCompilation compilation, MethodSymbol method, BoundNode nodeToAnalyze, BoundNode? constructorBody, BindingDiagnosticBag diagnostics)
1533CSharpCompilation compilation,
1548CSharpCompilation compilation,
1564CSharpCompilation compilation,
1609static bool isNullableAnalysisEnabledAnywhere(CSharpCompilation compilation)
1684private static bool HasRequiredLanguageVersion(CSharpCompilation compilation)
1693internal static bool NeedsAnalysis(CSharpCompilation compilation, SyntaxNode syntaxNode)
1708var compilation = binder.Compilation;
1741CSharpCompilation compilation,
1779CSharpCompilation compilation,
2421static bool allowUnconstrainedTypeParameterAnnotations(CSharpCompilation compilation)
6417static 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;