protected override ReadOnlyArray<ParameterSymbol> MakeParameters(Binder binder, DelegateDeclarationSyntax syntax, out bool isExtensionMethod, out bool isVararg, DiagnosticBag diagnostics, CancellationToken cancellationToken) { isExtensionMethod = false; isVararg = false; return ReadOnlyArray<ParameterSymbol>.CreateFrom( new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), 0, RefKind.None, "object"), new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax), 1, RefKind.None, "method")); }
protected override ReadOnlyArray <ParameterSymbol> MakeParameters(Binder binder, DelegateDeclarationSyntax syntax, out bool isExtensionMethod, out bool isVararg, DiagnosticBag diagnostics, CancellationToken cancellationToken) { isExtensionMethod = false; isVararg = false; return(ReadOnlyArray <ParameterSymbol> .CreateFrom( new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), 0, RefKind.None, "object"), new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax), 1, RefKind.None, "method"))); }
protected override ReadOnlyArray<ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, out bool isExtensionMethod, out bool isVararg, DiagnosticBag diagnostics, CancellationToken cancellationToken) { isExtensionMethod = false; isVararg = false; var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(); int ordinal = 0; foreach (var p in delegateBinder.invoke.Parameters) { cancellationToken.ThrowIfCancellationRequested(); if (p.RefKind != RefKind.None) { parameters.Add(new SynthesizedParameterSymbol(this, p.Type, ordinal++, p.RefKind, p.Name)); } } parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax), ordinal++, RefKind.None, "result")); return parameters.ToReadOnlyAndFree(); }
protected override ReadOnlyArray <ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, out bool isExtensionMethod, out bool isVararg, DiagnosticBag diagnostics, CancellationToken cancellationToken) { isExtensionMethod = false; isVararg = false; var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder <ParameterSymbol> .GetInstance(); int ordinal = 0; foreach (var p in delegateBinder.invoke.Parameters) { cancellationToken.ThrowIfCancellationRequested(); if (p.RefKind != RefKind.None) { parameters.Add(new SynthesizedParameterSymbol(this, p.Type, ordinal++, p.RefKind, p.Name)); } } parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax), ordinal++, RefKind.None, "result")); return(parameters.ToReadOnlyAndFree()); }
protected override ReadOnlyArray <ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder <ParameterSymbol> .GetInstance(); foreach (SourceParameterSymbol p in delegateBinder.invoke.Parameters) { var synthesizedParam = new SourceClonedParameterSymbol(originalParam: p, newOwner: this, newOrdinal: p.Ordinal, suppressOptional: true); parameters.Add(synthesizedParam); } int paramCount = delegateBinder.invoke.Parameters.Count; parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax), paramCount, RefKind.None, "callback")); parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), paramCount + 1, RefKind.None, "object")); return(parameters.ToReadOnlyAndFree()); }
protected override ReadOnlyArray<ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, out bool isExtensionMethod, out bool isVararg, DiagnosticBag diagnostics, CancellationToken cancellationToken) { isExtensionMethod = false; isVararg = false; var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(); foreach (var p in delegateBinder.invoke.Parameters) { cancellationToken.ThrowIfCancellationRequested(); parameters.Add(new SynthesizedParameterSymbol(this, p.Type, p.Ordinal, p.RefKind, p.Name)); } parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax), delegateBinder.invoke.Parameters.Count, RefKind.None, "callback")); parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), delegateBinder.invoke.Parameters.Count + 1, RefKind.None, "object")); return parameters.ToReadOnlyAndFree(); }
protected override ReadOnlyArray <ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, out bool isExtensionMethod, out bool isVararg, DiagnosticBag diagnostics, CancellationToken cancellationToken) { isExtensionMethod = false; isVararg = false; var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder <ParameterSymbol> .GetInstance(); foreach (var p in delegateBinder.invoke.Parameters) { cancellationToken.ThrowIfCancellationRequested(); parameters.Add(new SynthesizedParameterSymbol(this, p.Type, p.Ordinal, p.RefKind, p.Name)); } parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax), delegateBinder.invoke.Parameters.Count, RefKind.None, "callback")); parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), delegateBinder.invoke.Parameters.Count + 1, RefKind.None, "object")); return(parameters.ToReadOnlyAndFree()); }
protected override ReadOnlyArray <ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder <ParameterSymbol> .GetInstance(); int ordinal = 0; foreach (SourceParameterSymbol p in delegateBinder.invoke.Parameters) { if (p.RefKind != RefKind.None) { var synthesizedParam = new SourceClonedParameterSymbol(originalParam: p, newOwner: this, newOrdinal: ordinal++, suppressOptional: true); parameters.Add(synthesizedParam); } } parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax), ordinal++, RefKind.None, "result")); return(parameters.ToReadOnlyAndFree()); }
protected override TypeSymbol MakeReturnType(Binder bodyBinder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { return(bodyBinder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax)); }
protected override TypeSymbol MakeReturnType(Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { return binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax); }
protected override ReadOnlyArray<ParameterSymbol> MakeParameters(Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { return ReadOnlyArray<ParameterSymbol>.CreateFrom( new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), 0, RefKind.None, "object"), new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax), 1, RefKind.None, "method")); }
protected override ReadOnlyArray<ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(); int ordinal = 0; foreach (SourceParameterSymbol p in delegateBinder.invoke.Parameters) { if (p.RefKind != RefKind.None) { var synthesizedParam = new SourceClonedParameterSymbol(originalParam: p, newOwner: this, newOrdinal: ordinal++, suppressOptional: true); parameters.Add(synthesizedParam); } } parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax), ordinal++, RefKind.None, "result")); return parameters.ToReadOnlyAndFree(); }
protected override ReadOnlyArray<ParameterSymbol> MakeParameters( Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { var delegateBinder = binder as DelegateBinder; var parameters = ArrayBuilder<ParameterSymbol>.GetInstance(); foreach (SourceParameterSymbol p in delegateBinder.invoke.Parameters) { var synthesizedParam = new SourceClonedParameterSymbol(originalParam: p, newOwner: this, newOrdinal: p.Ordinal, suppressOptional: true); parameters.Add(synthesizedParam); } int paramCount = delegateBinder.invoke.Parameters.Count; parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax), paramCount, RefKind.None, "callback")); parameters.Add(new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), paramCount + 1, RefKind.None, "object")); return parameters.ToReadOnlyAndFree(); }
protected override ReadOnlyArray <ParameterSymbol> MakeParameters(Binder binder, DelegateDeclarationSyntax syntax, DiagnosticBag diagnostics) { return(ReadOnlyArray <ParameterSymbol> .CreateFrom( new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax), 0, RefKind.None, "object"), new SynthesizedParameterSymbol(this, binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax), 1, RefKind.None, "method"))); }