本文整理汇总了C#中IServiceClient类的典型用法代码示例。如果您正苦于以下问题:C# IServiceClient类的具体用法?C# IServiceClient怎么用?C# IServiceClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IServiceClient类属于命名空间,在下文中一共展示了IServiceClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AbortMultipartUploadCommand
private AbortMultipartUploadCommand(IServiceClient client, Uri endpoint, ExecutionContext context,
AbortMultipartUploadRequest abortMultipartUploadRequest)
: base(client, endpoint, context)
{
_abortMultipartUploadRequest = abortMultipartUploadRequest;
}
示例2: BuildService
/// <summary>Initializes a new instance of the <see cref="BuildService"/> class.</summary>
/// <param name="serviceClient">The service client.</param>
/// <param name="converterForBuild">The converter for <see cref="Build"/>.</param>
internal BuildService(IServiceClient serviceClient, IConverter<BuildDataContract, Build> converterForBuild)
{
Debug.Assert(serviceClient != null, "serviceClient != null");
Debug.Assert(converterForBuild != null, "converterForBuild != null");
this.serviceClient = serviceClient;
this.converterForBuild = converterForBuild;
}
示例3: ModCommand
public ModCommand(IServiceClient serviceClient)
: base("mod")
{
this.serviceClient = serviceClient;
RegisterCommand(new ListCommand(serviceClient));
}
示例4: SetObjectAclCommand
private SetObjectAclCommand(IServiceClient client, Uri endpoint,
ExecutionContext context,
SetObjectAclRequest request)
: base(client, endpoint, context)
{
_request = request;
}
示例5: CreateBucketCommand
private CreateBucketCommand(IServiceClient client, Uri endpoint, ExecutionContext context,
string bucketName)
: base(client, endpoint, context)
{
OssUtils.CheckBucketName(bucketName);
_bucketName = bucketName;
}
示例6: Create
public static SetObjectAclCommand Create(IServiceClient client, Uri endpoint,
ExecutionContext context,
SetObjectAclRequest request)
{
OssUtils.CheckBucketName(request.BucketName);
OssUtils.CheckObjectKey(request.Key);
return new SetObjectAclCommand(client, endpoint, context, request);
}
示例7: RenderService
/// <summary>Initializes a new instance of the <see cref="RenderService"/> class.</summary>
/// <param name="serviceClient">The service client.</param>
/// <exception cref="ArgumentNullException">The value of <paramref name="serviceClient"/> is a null reference.</exception>
public RenderService(IServiceClient serviceClient)
{
if (serviceClient == null)
{
throw new ArgumentNullException("serviceClient", "Precondition: serviceClient != null");
}
this.serviceClient = serviceClient;
}
示例8: FactoryBase
/// <summary>Initializes a new instance of the <see cref="FactoryBase"/> class.</summary>
/// <param name="serviceClient"></param>
/// <exception cref="ArgumentNullException">The value of <paramref name="serviceClient"/> is a null reference.</exception>
protected FactoryBase(IServiceClient serviceClient)
{
if (serviceClient == null)
{
throw new ArgumentNullException("serviceClient", "Precondition failed: serviceClient != null");
}
this.serviceClient = serviceClient;
}
示例9: MapRepositoryFactory
/// <summary>Initializes a new instance of the <see cref="MapRepositoryFactory"/> class.</summary>
/// <param name="serviceClient">The service client.</param>
public MapRepositoryFactory(IServiceClient serviceClient)
{
if (serviceClient == null)
{
throw new ArgumentNullException("serviceClient", "Precondition: serviceClient != null");
}
this.serviceClient = serviceClient;
}
示例10: MapNameRepositoryFactory
/// <summary>Initializes a new instance of the <see cref="MapNameRepositoryFactory"/> class.</summary>
/// <param name="serviceClient"></param>
public MapNameRepositoryFactory(IServiceClient serviceClient)
{
if (serviceClient == null)
{
throw new ArgumentNullException("serviceClient");
}
this.serviceClient = serviceClient;
}
示例11: SetBucketAclCommand
private SetBucketAclCommand(IServiceClient client, Uri endpoint, ExecutionContext context,
string bucketName, SetBucketAclRequest request)
: base(client, endpoint, context)
{
OssUtils.CheckBucketName(bucketName);
_bucketName = bucketName;
_request = request;
}
示例12: Model
public Model(IServiceClient serviceClient)
{
if (serviceClient == null)
{
throw new ArgumentNullException("serviceClient");
}
_serviceClient = serviceClient;
}
示例13: DeleteObjectCommand
private DeleteObjectCommand(IServiceClient client, Uri endpoint, ExecutionContext context,
string bucketName, string key)
: base(client, endpoint, context)
{
OssUtils.CheckBucketName(bucketName);
OssUtils.CheckObjectKey(key);
_bucketName = bucketName;
_key = key;
}
示例14: Async_Call_HelloWorld_with_ServiceClients_on_PreDefined_Routes
public void Async_Call_HelloWorld_with_ServiceClients_on_PreDefined_Routes(IServiceClient client)
{
HelloResponse response = null;
client.SendAsync<HelloResponse>(new Hello { Name = "World!" },
r => response = r, (r, e) => Assert.Fail("NetworkError"));
Thread.Sleep(TimeSpan.FromSeconds(1));
Assert.That(response.Result, Is.EqualTo("Hello, World!"));
}
示例15: Create
public static AbortMultipartUploadCommand Create(IServiceClient client, Uri endpoint, ExecutionContext context,
AbortMultipartUploadRequest abortMultipartUploadRequest)
{
OssUtils.CheckBucketName(abortMultipartUploadRequest.BucketName);
OssUtils.CheckObjectKey(abortMultipartUploadRequest.Key);
if (string.IsNullOrEmpty(abortMultipartUploadRequest.UploadId))
throw new ArgumentException(Resources.ExceptionIfArgumentStringIsNullOrEmpty, "uploadId");
return new AbortMultipartUploadCommand(client, endpoint, context, abortMultipartUploadRequest);
}