Ejemplo n.º 1
0
 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);
                }
            }
Ejemplo n.º 3
0
 internal DelegateConstructor(
     SourceNamedTypeSymbol delegateType,
     DelegateDeclarationSyntax syntax,
     Binder binder,
     CancellationToken cancellationToken)
     : base(delegateType, CommonMemberNames.InstanceConstructorName, syntax, MethodKind.Constructor, DeclarationModifiers.Public, binder, diagnostics: null, cancellationToken: cancellationToken)
 {
 }
Ejemplo n.º 4
0
 internal DelegateEndInvokeMethod(
     SourceNamedTypeSymbol delegateType,
     DelegateDeclarationSyntax syntax,
     DelegateBinder binder,
     DiagnosticBag diagnostics)
     : base(delegateType, syntax, MethodKind.Ordinary, DeclarationModifiers.Virtual | DeclarationModifiers.Public, binder, diagnostics)
 {
 }
Ejemplo n.º 5
0
 internal DelegateInvokeMethodImplementation(
     SourceNamedTypeSymbol delegateType,
     DelegateDeclarationSyntax syntax,
     Binder binder,
     DiagnosticBag diagnostics)
     : base(delegateType, syntax, MethodKind.DelegateInvoke, DeclarationModifiers.Virtual | DeclarationModifiers.Public, binder, diagnostics)
 {
 }
 internal DelegateConstructor(
     SourceNamedTypeSymbol delegateType,
     DelegateDeclarationSyntax syntax,
     Binder binder,
     CancellationToken cancellationToken)
     : base(delegateType, CommonMemberNames.InstanceConstructorName, syntax, MethodKind.Constructor, DeclarationModifiers.Public, binder, diagnostics: null, cancellationToken: cancellationToken)
 {
 }
Ejemplo n.º 7
0
 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]);
                }
            }
Ejemplo n.º 10
0
            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]);
                }
            }
            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 DelegateBinder(Binder bodyBinder, SourceNamedTypeSymbol delegateType, DelegateInvokeMethodImplementation invoke)
     : base(bodyBinder)
 {
     this.delegateType = delegateType;
     this.invoke = invoke;
 }
 internal DelegateConstructor(
     SourceNamedTypeSymbol delegateType,
     DelegateDeclarationSyntax syntax,
     Binder binder)
     : base(delegateType, syntax, MethodKind.Constructor, DeclarationModifiers.Public, binder, diagnostics: null)
 {
 }
 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)
 {
 }
Ejemplo n.º 16
0
 internal DelegateBinder(Binder bodyBinder, SourceNamedTypeSymbol delegateType, DelegateInvokeMethodImplementation invoke)
     : base(bodyBinder)
 {
     this.delegateType = delegateType;
     this.invoke       = invoke;
 }