@@ -51,28 +51,80 @@ type BasicProvider (config : TypeProviderConfig) as this =
5151 myType.AddMember( innerState)
5252
5353 let someMethod = ProvidedMethod( " DoNothing" , [], typeof< unit>,
54- InvokeCode = fun args -> <@@ Helper.doNothing();
55- Helper.doNothingOneArg( 3 )
56- Helper.doNothingGeneric( 3 )
57- Helper.C.DoNothing()
58- Helper.C.DoNothingGeneric( 3 )
59- Helper.C.DoNothingOneArg( 3 )
60- Helper.C.DoNothingTwoArg( Helper.C(), 3 )
61- Helper.C() .InstanceDoNothing()
62- Helper.C() .InstanceDoNothingGeneric( 3 )
63- Helper.C() .InstanceDoNothingOneArg( 3 )
64- Helper.C() .InstanceDoNothingTwoArg( Helper.C(), 3 )
65- Helper.G< int>. DoNothing()
66- // These do not seem to compile correctly when used in provided expressions:
67- //Helper.G<int>.DoNothingGeneric(3)
68- Helper.G< int>. DoNothingOneArg( 3 )
69- Helper.G< int>. DoNothingTwoArg( Helper.C(), 3 )
70- Helper.G< int>() .InstanceDoNothing()
71- // These do not seem to compile correctly when used in provided expressions:
72- //Helper.G<int>().InstanceDoNothingGeneric(3)
73- Helper.G< int>() .InstanceDoNothingOneArg( 3 )
74- Helper.G< int>() .InstanceDoNothingTwoArg( Helper.C(), 3 ) @@>)
54+ InvokeCode = fun args -> <@@ Helper.doNothing() @@>)
55+ myType.AddMember( someMethod)
56+
57+ let someMethod = ProvidedMethod( " DoNothingOneArg" , [], typeof< unit>,
58+ InvokeCode = fun args -> <@@ Helper.doNothingOneArg( 3 ) @@>)
59+ myType.AddMember( someMethod)
60+
61+ let someMethod = ProvidedMethod( " DoNothingGeneric" , [], typeof< unit>,
62+ InvokeCode = fun args -> <@@ Helper.doNothingGeneric( 3 ) @@>)
63+ myType.AddMember( someMethod)
64+
65+ let someMethod = ProvidedMethod( " ClassDoNothing" , [], typeof< unit>,
66+ InvokeCode = fun args -> <@@ Helper.C.DoNothing() @@>)
67+ myType.AddMember( someMethod)
68+
69+ let someMethod = ProvidedMethod( " ClassDoNothingGeneric" , [], typeof< unit>,
70+ InvokeCode = fun args -> <@@ Helper.C.DoNothingGeneric( 3 ) @@>)
71+
72+ myType.AddMember( someMethod)
73+
74+ let someMethod = ProvidedMethod( " ClassDoNothingOneArg" , [], typeof< unit>,
75+ InvokeCode = fun args -> <@@ Helper.C.DoNothingOneArg( 3 ) @@>)
76+
77+ myType.AddMember( someMethod)
78+
79+ let someMethod = ProvidedMethod( " ClassDoNothingTwoArg" , [], typeof< unit>,
80+ InvokeCode = fun args -> <@@ Helper.C.DoNothingTwoArg( Helper.C(), 3 ) @@>)
81+ myType.AddMember( someMethod)
82+
83+ let someMethod = ProvidedMethod( " ClassInstanceDoNothing" , [], typeof< unit>,
84+ InvokeCode = fun args -> <@@ Helper.C() .InstanceDoNothing() @@>)
85+ myType.AddMember( someMethod)
86+
87+ let someMethod = ProvidedMethod( " ClassInstanceDoNothingGeneric" , [], typeof< unit>,
88+ InvokeCode = fun args -> <@@ Helper.C() .InstanceDoNothingGeneric( 3 ) @@>)
89+ myType.AddMember( someMethod)
90+
91+ let someMethod = ProvidedMethod( " ClassInstanceDoNothingOneArg" , [], typeof< unit>,
92+ InvokeCode = fun args -> <@@ Helper.C() .InstanceDoNothingOneArg( 3 ) @@>)
93+ myType.AddMember( someMethod)
94+
95+ let someMethod = ProvidedMethod( " ClassInstanceDoNothingTwoArg" , [], typeof< unit>,
96+ InvokeCode = fun args -> <@@ Helper.C() .InstanceDoNothingTwoArg( Helper.C(), 3 ) @@>)
97+ myType.AddMember( someMethod)
98+
99+ let someMethod = ProvidedMethod( " GenericClassDoNothing" , [], typeof< unit>,
100+ InvokeCode = fun args -> <@@ Helper.G< int>. DoNothing() @@>)
101+ myType.AddMember( someMethod)
102+
103+ // These do not seem to compile correctly when used in provided expressions:
104+ //Helper.G<int>.DoNothingGeneric(3)
105+
106+ // These do not seem to compile correctly when used in provided expressions:
107+ //Helper.G<int>().InstanceDoNothingGeneric(3)
108+
109+ let someMethod = ProvidedMethod( " GenericClassDoNothingOneArg" , [], typeof< unit>,
110+ InvokeCode = fun args -> <@@ Helper.G< int>. DoNothingOneArg( 3 ) @@>)
111+ myType.AddMember( someMethod)
112+
113+ let someMethod = ProvidedMethod( " GenericClassDoNothingTwoArg" , [], typeof< unit>,
114+ InvokeCode = fun args -> <@@ Helper.G< int>. DoNothingTwoArg( Helper.C(), 3 ) @@>)
115+ myType.AddMember( someMethod)
116+
117+ let someMethod = ProvidedMethod( " GenericClassInstanceDoNothing" , [], typeof< unit>,
118+ InvokeCode = fun args -> <@@ Helper.G< int>() .InstanceDoNothing() @@>)
119+ myType.AddMember( someMethod)
120+
121+
122+ let someMethod = ProvidedMethod( " GenericClassInstanceDoNothingOneArg" , [], typeof< unit>,
123+ InvokeCode = fun args -> <@@ Helper.G< int>() .InstanceDoNothingOneArg( 3 ) @@>)
124+ myType.AddMember( someMethod)
75125
126+ let someMethod = ProvidedMethod( " GenericClassInstanceDoNothingTwoArg" , [], typeof< unit>,
127+ InvokeCode = fun args -> <@@ Helper.G< int>() .InstanceDoNothingTwoArg( Helper.C(), 3 ) @@>)
76128 myType.AddMember( someMethod)
77129
78130 [ myType]
0 commit comments