当前位置: 首页>>代码示例>>C#>>正文


C# RequestOptions.ToString方法代码示例

本文整理汇总了C#中RequestOptions.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# RequestOptions.ToString方法的具体用法?C# RequestOptions.ToString怎么用?C# RequestOptions.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RequestOptions的用法示例。


在下文中一共展示了RequestOptions.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ListAllSpacesForDomainDeprecated

 /// <summary>
 /// List all Spaces for the Domain (deprecated)
 /// <para>For detailed information, see online documentation at: "http://apidocs.cloudfoundry.org/195/domains__deprecated_/list_all_spaces_for_the_domain_(deprecated).html"</para>
 /// </summary>
 public async Task<PagedResponseCollection<ListAllSpacesForDomainDeprecatedResponse>> ListAllSpacesForDomainDeprecated(Guid? guid, RequestOptions options)
 {
     UriBuilder uriBuilder = new UriBuilder(this.Client.CloudTarget);
     uriBuilder.Path = string.Format(CultureInfo.InvariantCulture, "/v2/domains/{0}/spaces", guid);
     uriBuilder.Query = options.ToString();
     var client = this.GetHttpClient();
     client.Uri = uriBuilder.Uri;
     client.Method = HttpMethod.Get;
     var authHeader = await BuildAuthenticationHeader();
     if (!string.IsNullOrWhiteSpace(authHeader.Key))
     {
         client.Headers.Add(authHeader);
     }
     var expectedReturnStatus = 200;
     var response = await this.SendAsync(client, expectedReturnStatus);
     return Utilities.DeserializePage<ListAllSpacesForDomainDeprecatedResponse>(await response.ReadContentAsStringAsync(), this.Client);
 }
开发者ID:adasescu,项目名称:cf-dotnet-sdk-1,代码行数:21,代码来源:DomainsDeprecated.cs

示例2: ListAllOrganizationQuotaDefinitions

 /// <summary>
 /// List all Organization Quota Definitions
 /// <para>For detailed information, see online documentation at: "http://apidocs.cloudfoundry.org/195/organization_quota_definitions/list_all_organization_quota_definitions.html"</para>
 /// </summary>
 public async Task<PagedResponseCollection<ListAllOrganizationQuotaDefinitionsResponse>> ListAllOrganizationQuotaDefinitions(RequestOptions options)
 {
     UriBuilder uriBuilder = new UriBuilder(this.Client.CloudTarget);
     uriBuilder.Path = "/v2/quota_definitions";
     uriBuilder.Query = options.ToString();
     var client = this.GetHttpClient();
     client.Uri = uriBuilder.Uri;
     client.Method = HttpMethod.Get;
     var authHeader = await BuildAuthenticationHeader();
     if (!string.IsNullOrWhiteSpace(authHeader.Key))
     {
         client.Headers.Add(authHeader);
     }
     var expectedReturnStatus = 200;
     var response = await this.SendAsync(client, expectedReturnStatus);
     return Utilities.DeserializePage<ListAllOrganizationQuotaDefinitionsResponse>(await response.ReadContentAsStringAsync(), this.Client);
 }
开发者ID:adasescu,项目名称:cf-dotnet-sdk-1,代码行数:21,代码来源:OrganizationQuotaDefinitions.cs

示例3: ReturnSecurityGroupsUsedForRunningApps

 /// <summary>
 /// Return the Security Groups used for running Apps
 /// <para>For detailed information, see online documentation at: "http://apidocs.cloudfoundry.org/195/security_group_running_defaults/return_the_security_groups_used_for_running_apps.html"</para>
 /// </summary>
 public async Task<PagedResponseCollection<ReturnSecurityGroupsUsedForRunningAppsResponse>> ReturnSecurityGroupsUsedForRunningApps(RequestOptions options)
 {
     UriBuilder uriBuilder = new UriBuilder(this.Client.CloudTarget);
     uriBuilder.Path = "/v2/config/running_security_groups";
     uriBuilder.Query = options.ToString();
     var client = this.GetHttpClient();
     client.Uri = uriBuilder.Uri;
     client.Method = HttpMethod.Get;
     var authHeader = await BuildAuthenticationHeader();
     if (!string.IsNullOrWhiteSpace(authHeader.Key))
     {
         client.Headers.Add(authHeader);
     }
     var expectedReturnStatus = 200;
     var response = await this.SendAsync(client, expectedReturnStatus);
     return Utilities.DeserializePage<ReturnSecurityGroupsUsedForRunningAppsResponse>(await response.ReadContentAsStringAsync(), this.Client);
 }
开发者ID:adasescu,项目名称:cf-dotnet-sdk-1,代码行数:21,代码来源:SecurityGroupRunningDefaults.cs

示例4: FilterResultSetByLabelDeprecated

 /// <summary>
 /// Filtering the result set by label (deprecated)
 /// <para>For detailed information, see online documentation at: "http://apidocs.cloudfoundry.org/195/serviceauthtokens__deprecated_/filtering_the_result_set_by_label_(deprecated).html"</para>
 /// </summary>
 public async Task<PagedResponseCollection<FilterResultSetByLabelDeprecatedResponse>> FilterResultSetByLabelDeprecated(RequestOptions options)
 {
     UriBuilder uriBuilder = new UriBuilder(this.Client.CloudTarget);
     uriBuilder.Path = "/v2/service_auth_tokens";
     uriBuilder.Query = options.ToString();
     var client = this.GetHttpClient();
     client.Uri = uriBuilder.Uri;
     client.Method = HttpMethod.Get;
     var authHeader = await BuildAuthenticationHeader();
     if (!string.IsNullOrWhiteSpace(authHeader.Key))
     {
         client.Headers.Add(authHeader);
     }
     var expectedReturnStatus = 200;
     var response = await this.SendAsync(client, expectedReturnStatus);
     return Utilities.DeserializePage<FilterResultSetByLabelDeprecatedResponse>(await response.ReadContentAsStringAsync(), this.Client);
 }
开发者ID:adasescu,项目名称:cf-dotnet-sdk-1,代码行数:21,代码来源:ServiceauthtokensDeprecated.cs


注:本文中的RequestOptions.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。