-
Notifications
You must be signed in to change notification settings - Fork 921
Expand file tree
/
Copy pathRemoteServiceProxy.cs
More file actions
41 lines (35 loc) · 1.46 KB
/
RemoteServiceProxy.cs
File metadata and controls
41 lines (35 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Surging.Core.CPlatform;
using Surging.Core.CPlatform.Convertibles;
using Surging.Core.CPlatform.Routing;
using Surging.Core.CPlatform.Runtime.Client;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Surging.Core.ProxyGenerator.Implementation
{
public class RemoteServiceProxy : ServiceProxyBase
{
/// <summary>
/// 远程服务代理,通过RoutePath调用服务时使用
/// 由ServiceProxyProvider调用
/// 通过执行基类的Invoke函数实现远程服务调用
/// </summary>
public RemoteServiceProxy(string serviceKey, CPlatformContainer serviceProvider)
: this(serviceProvider.GetInstances<IRemoteInvokeService>(),
serviceProvider.GetInstances<ITypeConvertibleService>(), serviceKey, serviceProvider,
serviceProvider.GetInstances<IServiceRouteProvider>())
{
}
public RemoteServiceProxy(IRemoteInvokeService remoteInvokeService,
ITypeConvertibleService typeConvertibleService, String serviceKey,
CPlatformContainer serviceProvider, IServiceRouteProvider serviceRouteProvider
) : base(remoteInvokeService, typeConvertibleService, serviceKey, serviceProvider)
{
}
public new async Task<T> Invoke<T>(IDictionary<string, object> parameters, string serviceId)
{
return await base.Invoke<T>(parameters, serviceId);
}
}
}