本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}