internal DelegateConstructor( SourceNamedTypeSymbol delegateType, DelegateDeclarationSyntax syntax, Binder binder) : base(delegateType, syntax, MethodKind.Constructor, DeclarationModifiers.Public, binder, diagnostics: null) { }
protected DelegateMethodSymbol( SourceNamedTypeSymbol containingType, string name, DelegateDeclarationSyntax syntax, MethodKind methodKind, DeclarationModifiers declarationModifiers, Binder binder, DiagnosticBag diagnostics, CancellationToken cancellationToken) : base(containingType, name, binder.GetSyntaxReference(syntax), blockSyntax: null, location: binder.Location(syntax.Identifier)) { var location = this.locations[0]; bool isExtensionMethod; this.parameters = MakeParameters(binder, syntax, out isExtensionMethod, out this.isVararg, diagnostics, cancellationToken); this.returnType = MakeReturnType(binder, syntax, diagnostics); this.flags = MakeFlags(methodKind, declarationModifiers, IsVoidType(this.returnType), isExtensionMethod: isExtensionMethod); var info = ModifierUtils.CheckAccessibility(this.DeclarationModifiers); if (info != null) { diagnostics.Add(info, location); } }
internal DelegateConstructor( SourceNamedTypeSymbol delegateType, DelegateDeclarationSyntax syntax, Binder binder, CancellationToken cancellationToken) : base(delegateType, CommonMemberNames.InstanceConstructorName, syntax, MethodKind.Constructor, DeclarationModifiers.Public, binder, diagnostics: null, cancellationToken: cancellationToken) { }
internal DelegateEndInvokeMethod( SourceNamedTypeSymbol delegateType, DelegateDeclarationSyntax syntax, DelegateBinder binder, DiagnosticBag diagnostics) : base(delegateType, syntax, MethodKind.Ordinary, DeclarationModifiers.Virtual | DeclarationModifiers.Public, binder, diagnostics) { }
internal DelegateInvokeMethodImplementation( SourceNamedTypeSymbol delegateType, DelegateDeclarationSyntax syntax, Binder binder, DiagnosticBag diagnostics) : base(delegateType, syntax, MethodKind.DelegateInvoke, DeclarationModifiers.Virtual | DeclarationModifiers.Public, binder, diagnostics) { }
internal DelegateBeginInvokeMethod( SourceNamedTypeSymbol delegateType, DelegateDeclarationSyntax syntax, DelegateBinder binder, DiagnosticBag diagnostics, CancellationToken cancellationToken) : base(delegateType, CommonMemberNames.DelegateBeginInvokeName, syntax, MethodKind.Ordinary, DeclarationModifiers.Virtual | DeclarationModifiers.Public, binder, diagnostics, cancellationToken) { }
internal DelegateEndInvokeMethod( SourceNamedTypeSymbol delegateType, DelegateDeclarationSyntax syntax, DelegateBinder binder, DiagnosticBag diagnostics, CancellationToken cancellationToken) : base(delegateType, CommonMemberNames.DelegateEndInvokeName, syntax, MethodKind.Ordinary, DeclarationModifiers.Virtual | DeclarationModifiers.Public, binder, diagnostics, cancellationToken) { }
protected DelegateMethodSymbol( SourceNamedTypeSymbol containingType, DelegateDeclarationSyntax syntax, MethodKind methodKind, DeclarationModifiers declarationModifiers, Binder binder, DiagnosticBag diagnostics) : base(containingType, binder.GetSyntaxReference(syntax), blockSyntaxReference: null, location: binder.Location(syntax.Identifier)) { this.parameters = MakeParameters(binder, syntax, diagnostics); this.returnType = MakeReturnType(binder, syntax, diagnostics); this.flags = MakeFlags(methodKind, declarationModifiers, this.returnType.SpecialType == SpecialType.System_Void, isExtensionMethod: false); var info = ModifierUtils.CheckAccessibility(this.DeclarationModifiers); if (info != null) { diagnostics.Add(info, this.locations[0]); } }
internal DelegateBinder(Binder bodyBinder, SourceNamedTypeSymbol delegateType, DelegateInvokeMethodImplementation invoke) : base(bodyBinder) { this.delegateType = delegateType; this.invoke = invoke; }