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)); }
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)); }