コード例 #1
0
 public static I ForMicroservice <I>(ServicePartitionKey partitionKey = null) where I : class, IService
 {
     Debug.Assert(
         typeof(I).Namespace.Contains(Constant.Manager),
         $"Invalid microservice call. Use only the {Constant.Manager} interface to access a microservice.");
     return(ForService <I>(defaultProxyFactory, Addressing.Microservice <I>(), partitionKey));
 }
コード例 #2
0
 public static I ForMicroservice <I>(ServiceProxyFactory serviceProxyFactory, ServicePartitionKey partitionKey = null) where I : class, IService
 {
     if (serviceProxyFactory == null)
     {
         throw new ArgumentNullException(nameof(serviceProxyFactory), "Invalid microservice call. Must supply service proxy factory.");
     }
     Debug.Assert(
         typeof(I).Namespace.Contains(Constant.Manager),
         $"Invalid microservice call. Use only the {Constant.Manager} interface to access a microservice.");
     return(ForService <I>(serviceProxyFactory, Addressing.Microservice <I>(), partitionKey));
 }