Skip to content

Commit 47698b0

Browse files
committed
Regenerating proxies for meta-api
1 parent 9a9a595 commit 47698b0

File tree

3 files changed

+171
-102
lines changed

3 files changed

+171
-102
lines changed
Lines changed: 63 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
using System;
2+
using System.Linq.Expressions;
13
using System.Reflection;
24
using System.Threading.Tasks;
5+
using WampSharp.V2;
36
using WampSharp.V2.CalleeProxy;
47
using WampSharp.V2.Client;
58

@@ -15,84 +18,108 @@ namespace WampSharp.V2.MetaApi
1518
//------------------------------------------------------------------------------
1619
internal class WampRegistrationDescriptorProxyProxy : CalleeProxyBase, global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy
1720
{
18-
private static readonly MethodInfo mMethod0 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetAllRegistrationsAsync());
19-
private static readonly MethodInfo mMethod1 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.LookupRegistrationIdAsync(default(string), default(global::WampSharp.V2.Core.Contracts.RegisterOptions)));
20-
private static readonly MethodInfo mMethod2 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetBestMatchingRegistrationIdAsync(default(string)));
21-
private static readonly MethodInfo mMethod3 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetRegistrationDetailsAsync(default(long)));
22-
private static readonly MethodInfo mMethod4 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetCalleesIdsAsync(default(long)));
23-
private static readonly MethodInfo mMethod5 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.CountCalleesAsync(default(long)));
24-
private static readonly MethodInfo mMethod6 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetAllRegistrations());
25-
private static readonly MethodInfo mMethod7 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.LookupRegistrationId(default(string), default(global::WampSharp.V2.Core.Contracts.RegisterOptions)));
26-
private static readonly MethodInfo mMethod8 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetBestMatchingRegistrationId(default(string)));
27-
private static readonly MethodInfo mMethod9 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetRegistrationDetails(default(long)));
28-
private static readonly MethodInfo mMethod10 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetCalleesIds(default(long)));
29-
private static readonly MethodInfo mMethod11 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.CountCallees(default(long)));
21+
private static readonly InvokeAsyncDelegate<global::WampSharp.V2.MetaApi.AvailableGroups> mMethodHandler0 = GetInvokeAsync<global::WampSharp.V2.MetaApi.AvailableGroups>(
22+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetAllRegistrationsAsync())
23+
);
24+
private static readonly InvokeAsyncDelegate<global::System.Nullable<long>> mMethodHandler1 = GetInvokeAsync<global::System.Nullable<long>>(
25+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.LookupRegistrationIdAsync(default(string), default(global::WampSharp.V2.Core.Contracts.RegisterOptions)))
26+
);
27+
private static readonly InvokeAsyncDelegate<global::System.Nullable<long>> mMethodHandler2 = GetInvokeAsync<global::System.Nullable<long>>(
28+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetBestMatchingRegistrationIdAsync(default(string)))
29+
);
30+
private static readonly InvokeAsyncDelegate<global::WampSharp.V2.MetaApi.RegistrationDetails> mMethodHandler3 = GetInvokeAsync<global::WampSharp.V2.MetaApi.RegistrationDetails>(
31+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetRegistrationDetailsAsync(default(long)))
32+
);
33+
private static readonly InvokeAsyncDelegate<long[]> mMethodHandler4 = GetInvokeAsync<long[]>(
34+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.GetCalleesIdsAsync(default(long)))
35+
);
36+
private static readonly InvokeAsyncDelegate<long> mMethodHandler5 = GetInvokeAsync<long>(
37+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptorProxy instance) => instance.CountCalleesAsync(default(long)))
38+
);
39+
private static readonly InvokeSyncDelegate<global::WampSharp.V2.MetaApi.AvailableGroups> mMethodHandler6 = GetInvokeSync<global::WampSharp.V2.MetaApi.AvailableGroups>(
40+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptor instance) => instance.GetAllRegistrations())
41+
);
42+
private static readonly InvokeSyncDelegate<global::System.Nullable<long>> mMethodHandler7 = GetInvokeSync<global::System.Nullable<long>>(
43+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptor instance) => instance.LookupRegistrationId(default(string), default(global::WampSharp.V2.Core.Contracts.RegisterOptions)))
44+
);
45+
private static readonly InvokeSyncDelegate<global::System.Nullable<long>> mMethodHandler8 = GetInvokeSync<global::System.Nullable<long>>(
46+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptor instance) => instance.GetBestMatchingRegistrationId(default(string)))
47+
);
48+
private static readonly InvokeSyncDelegate<global::WampSharp.V2.MetaApi.RegistrationDetails> mMethodHandler9 = GetInvokeSync<global::WampSharp.V2.MetaApi.RegistrationDetails>(
49+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptor instance) => instance.GetRegistrationDetails(default(long)))
50+
);
51+
private static readonly InvokeSyncDelegate<long[]> mMethodHandler10 = GetInvokeSync<long[]>(
52+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptor instance) => instance.GetCalleesIds(default(long)))
53+
);
54+
private static readonly InvokeSyncDelegate<long> mMethodHandler11 = GetInvokeSync<long>(
55+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampRegistrationDescriptor instance) => instance.CountCallees(default(long)))
56+
);
3057

3158
public WampRegistrationDescriptorProxyProxy
3259
(IWampRealmProxy realmProxy,
3360
ICalleeProxyInterceptor interceptor)
3461
: base(realmProxy, interceptor)
3562
{
3663
}
37-
64+
3865
public Task<global::WampSharp.V2.MetaApi.AvailableGroups> GetAllRegistrationsAsync()
3966
{
40-
return SingleInvokeAsync<global::WampSharp.V2.MetaApi.AvailableGroups>(mMethod0);
67+
return mMethodHandler0(this, global::System.Threading.CancellationToken.None);
4168
}
42-
69+
4370
public Task<global::System.Nullable<long>> LookupRegistrationIdAsync(string procedureUri, global::WampSharp.V2.Core.Contracts.RegisterOptions options)
4471
{
45-
return SingleInvokeAsync<global::System.Nullable<long>>(mMethod1, procedureUri, options);
72+
return mMethodHandler1(this, global::System.Threading.CancellationToken.None, procedureUri, options);
4673
}
47-
74+
4875
public Task<global::System.Nullable<long>> GetBestMatchingRegistrationIdAsync(string procedureUri)
4976
{
50-
return SingleInvokeAsync<global::System.Nullable<long>>(mMethod2, procedureUri);
77+
return mMethodHandler2(this, global::System.Threading.CancellationToken.None, procedureUri);
5178
}
52-
79+
5380
public Task<global::WampSharp.V2.MetaApi.RegistrationDetails> GetRegistrationDetailsAsync(long registrationId)
5481
{
55-
return SingleInvokeAsync<global::WampSharp.V2.MetaApi.RegistrationDetails>(mMethod3, registrationId);
82+
return mMethodHandler3(this, global::System.Threading.CancellationToken.None, registrationId);
5683
}
57-
84+
5885
public Task<long[]> GetCalleesIdsAsync(long registrationId)
5986
{
60-
return SingleInvokeAsync<long[]>(mMethod4, registrationId);
87+
return mMethodHandler4(this, global::System.Threading.CancellationToken.None, registrationId);
6188
}
62-
89+
6390
public Task<long> CountCalleesAsync(long registrationId)
6491
{
65-
return SingleInvokeAsync<long>(mMethod5, registrationId);
92+
return mMethodHandler5(this, global::System.Threading.CancellationToken.None, registrationId);
6693
}
67-
94+
6895
public global::WampSharp.V2.MetaApi.AvailableGroups GetAllRegistrations()
6996
{
70-
return SingleInvokeSync<global::WampSharp.V2.MetaApi.AvailableGroups>(mMethod6);
97+
return mMethodHandler6(this);
7198
}
72-
99+
73100
public global::System.Nullable<long> LookupRegistrationId(string procedureUri, global::WampSharp.V2.Core.Contracts.RegisterOptions options)
74101
{
75-
return SingleInvokeSync<global::System.Nullable<long>>(mMethod7, procedureUri, options);
102+
return mMethodHandler7(this, procedureUri, options);
76103
}
77-
104+
78105
public global::System.Nullable<long> GetBestMatchingRegistrationId(string procedureUri)
79106
{
80-
return SingleInvokeSync<global::System.Nullable<long>>(mMethod8, procedureUri);
107+
return mMethodHandler8(this, procedureUri);
81108
}
82-
109+
83110
public global::WampSharp.V2.MetaApi.RegistrationDetails GetRegistrationDetails(long registrationId)
84111
{
85-
return SingleInvokeSync<global::WampSharp.V2.MetaApi.RegistrationDetails>(mMethod9, registrationId);
112+
return mMethodHandler9(this, registrationId);
86113
}
87-
114+
88115
public long[] GetCalleesIds(long registrationId)
89116
{
90-
return SingleInvokeSync<long[]>(mMethod10, registrationId);
117+
return mMethodHandler10(this, registrationId);
91118
}
92-
119+
93120
public long CountCallees(long registrationId)
94121
{
95-
return SingleInvokeSync<long>(mMethod11, registrationId);
122+
return mMethodHandler11(this, registrationId);
96123
}
97124
}
98125
}
Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
using System;
2+
using System.Linq.Expressions;
13
using System.Reflection;
24
using System.Threading.Tasks;
5+
using WampSharp.V2;
36
using WampSharp.V2.CalleeProxy;
47
using WampSharp.V2.Client;
58

@@ -15,48 +18,60 @@ namespace WampSharp.V2.MetaApi
1518
//------------------------------------------------------------------------------
1619
internal class WampSessionDescriptorProxyProxy : CalleeProxyBase, global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy
1720
{
18-
private static readonly MethodInfo mMethod0 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.CountSessionsAsync());
19-
private static readonly MethodInfo mMethod1 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.GetAllSessionIdsAsync());
20-
private static readonly MethodInfo mMethod2 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.GetSessionDetailsAsync(default(long)));
21-
private static readonly MethodInfo mMethod3 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.CountSessions());
22-
private static readonly MethodInfo mMethod4 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.GetAllSessionIds());
23-
private static readonly MethodInfo mMethod5 = GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.GetSessionDetails(default(long)));
21+
private static readonly InvokeAsyncDelegate<long> mMethodHandler0 = GetInvokeAsync<long>(
22+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.CountSessionsAsync())
23+
);
24+
private static readonly InvokeAsyncDelegate<long[]> mMethodHandler1 = GetInvokeAsync<long[]>(
25+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.GetAllSessionIdsAsync())
26+
);
27+
private static readonly InvokeAsyncDelegate<global::WampSharp.V2.MetaApi.WampSessionDetails> mMethodHandler2 = GetInvokeAsync<global::WampSharp.V2.MetaApi.WampSessionDetails>(
28+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptorProxy instance) => instance.GetSessionDetailsAsync(default(long)))
29+
);
30+
private static readonly InvokeSyncDelegate<long> mMethodHandler3 = GetInvokeSync<long>(
31+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptor instance) => instance.CountSessions())
32+
);
33+
private static readonly InvokeSyncDelegate<long[]> mMethodHandler4 = GetInvokeSync<long[]>(
34+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptor instance) => instance.GetAllSessionIds())
35+
);
36+
private static readonly InvokeSyncDelegate<global::WampSharp.V2.MetaApi.WampSessionDetails> mMethodHandler5 = GetInvokeSync<global::WampSharp.V2.MetaApi.WampSessionDetails>(
37+
GetMethodInfo((global::WampSharp.V2.MetaApi.IWampSessionDescriptor instance) => instance.GetSessionDetails(default(long)))
38+
);
2439

2540
public WampSessionDescriptorProxyProxy
2641
(IWampRealmProxy realmProxy,
2742
ICalleeProxyInterceptor interceptor)
2843
: base(realmProxy, interceptor)
2944
{
3045
}
31-
46+
3247
public Task<long> CountSessionsAsync()
3348
{
34-
return SingleInvokeAsync<long>(mMethod0);
49+
return mMethodHandler0(this, global::System.Threading.CancellationToken.None);
3550
}
36-
51+
3752
public Task<long[]> GetAllSessionIdsAsync()
3853
{
39-
return SingleInvokeAsync<long[]>(mMethod1);
54+
return mMethodHandler1(this, global::System.Threading.CancellationToken.None);
4055
}
41-
56+
4257
public Task<global::WampSharp.V2.MetaApi.WampSessionDetails> GetSessionDetailsAsync(long sessionId)
4358
{
44-
return SingleInvokeAsync<global::WampSharp.V2.MetaApi.WampSessionDetails>(mMethod2, sessionId);
59+
return mMethodHandler2(this, global::System.Threading.CancellationToken.None, sessionId);
4560
}
46-
61+
4762
public long CountSessions()
4863
{
49-
return SingleInvokeSync<long>(mMethod3);
64+
return mMethodHandler3(this);
5065
}
51-
66+
5267
public long[] GetAllSessionIds()
5368
{
54-
return SingleInvokeSync<long[]>(mMethod4);
69+
return mMethodHandler4(this);
5570
}
56-
71+
5772
public global::WampSharp.V2.MetaApi.WampSessionDetails GetSessionDetails(long sessionId)
5873
{
59-
return SingleInvokeSync<global::WampSharp.V2.MetaApi.WampSessionDetails>(mMethod5, sessionId);
74+
return mMethodHandler5(this, sessionId);
6075
}
6176
}
6277
}

0 commit comments

Comments
 (0)