@@ -36,8 +36,6 @@ internal abstract class DeclarationsProvider
36
36
37
37
public virtual string WorkloadMethodReturnTypeName => WorkloadMethodReturnType . GetCorrectCSharpTypeName ( ) ;
38
38
39
- public virtual string WorkloadMethodDelegate ( string passArguments ) => Descriptor . WorkloadMethod . Name ;
40
-
41
39
public virtual string WorkloadMethodReturnTypeModifiers => null ;
42
40
43
41
public virtual string GetWorkloadMethodCall ( string passArguments ) => $ "{ Descriptor . WorkloadMethod . Name } ({ passArguments } )";
@@ -151,9 +149,6 @@ public TaskDeclarationsProvider(Descriptor descriptor) : base(descriptor) { }
151
149
152
150
// we use GetAwaiter().GetResult() because it's fastest way to obtain the result in blocking way,
153
151
// and will eventually throw actual exception, not aggregated one
154
- public override string WorkloadMethodDelegate ( string passArguments )
155
- => $ "({ passArguments } ) => {{ { Descriptor . WorkloadMethod . Name } ({ passArguments } ).GetAwaiter().GetResult(); }}";
156
-
157
152
public override string GetWorkloadMethodCall ( string passArguments ) => $ "{ Descriptor . WorkloadMethod . Name } ({ passArguments } ).GetAwaiter().GetResult()";
158
153
159
154
protected override Type WorkloadMethodReturnType => typeof ( void ) ;
@@ -170,9 +165,6 @@ public GenericTaskDeclarationsProvider(Descriptor descriptor) : base(descriptor)
170
165
171
166
// we use GetAwaiter().GetResult() because it's fastest way to obtain the result in blocking way,
172
167
// and will eventually throw actual exception, not aggregated one
173
- public override string WorkloadMethodDelegate ( string passArguments )
174
- => $ "({ passArguments } ) => {{ return { Descriptor . WorkloadMethod . Name } ({ passArguments } ).GetAwaiter().GetResult(); }}";
175
-
176
168
public override string GetWorkloadMethodCall ( string passArguments ) => $ "{ Descriptor . WorkloadMethod . Name } ({ passArguments } ).GetAwaiter().GetResult()";
177
169
}
178
170
}
0 commit comments