diff --git a/src/Sdk/BuildWebApi/Api/AgentTargetExecutionType.cs b/src/Sdk/BuildWebApi/Api/AgentTargetExecutionType.cs
deleted file mode 100644
index b2dc96d56..000000000
--- a/src/Sdk/BuildWebApi/Api/AgentTargetExecutionType.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using GitHub.Services.Common;
-
-namespace GitHub.Build.WebApi {
-
- [GenerateAllConstants]
- public static class AgentTargetExecutionType {
- public const Int32 Normal = 0;
- public const Int32 VariableMultipliers = 1;
- public const Int32 MultipleAgents = 2;
- }
-}
diff --git a/src/Sdk/BuildWebApi/Api/ArtifactResourceTypes.cs b/src/Sdk/BuildWebApi/Api/ArtifactResourceTypes.cs
index c9480e87f..8da1793cb 100644
--- a/src/Sdk/BuildWebApi/Api/ArtifactResourceTypes.cs
+++ b/src/Sdk/BuildWebApi/Api/ArtifactResourceTypes.cs
@@ -1,76 +1,14 @@
using System;
-using System.ComponentModel;
using GitHub.Services.Common;
namespace GitHub.Build.WebApi
{
- [Obsolete("Use ArtifactResourceTypes instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static class WellKnownArtifactResourceTypes
- {
- public const String FilePath = ArtifactResourceTypes.FilePath;
- public const String SymbolStore = ArtifactResourceTypes.SymbolStore;
- public const String VersionControl = ArtifactResourceTypes.VersionControl;
- public const String Container = ArtifactResourceTypes.Container;
- public const String GitRef = ArtifactResourceTypes.GitRef;
- public const String TfvcLabel = ArtifactResourceTypes.TfvcLabel;
- public const String SymbolRequest = ArtifactResourceTypes.SymbolRequest;
- }
-
- [GenerateAllConstants]
public static class ArtifactResourceTypes
{
- ///
- /// UNC or local folder path
- /// E.g. \\vscsstor\CIDrops\CloudU.Gated\140317.115955 or file://vscsstor/CIDrops/CloudU.Gated/140317.115955
- ///
- public const String FilePath = "FilePath";
-
- ///
- /// Symbol store UNC path
- /// E.g. \\symbolstore
- ///
- public const String SymbolStore = "SymbolStore";
-
- ///
- /// TF VC server folder path
- /// E.g. $/Dev1/Drops/CloudU.Gated/140317.115955
- ///
- public const String VersionControl = "VersionControl";
-
///
/// Build container reference
/// E.g. #/2121/drop
///
public const String Container = "Container";
-
- ///
- /// Git ref
- /// E.g. refs/tags/MyCIDefinition.Buildable
- ///
- public const String GitRef = "GitRef";
-
- ///
- /// TFVC label
- ///
- public const String TfvcLabel = "TfvcLabel";
-
- ///
- /// Symbol store URL
- /// E.g. https://mseng.artifacts.visualstudio.com/...
- ///
- public const String SymbolRequest = "SymbolRequest";
-
- ///
- /// Dedup Drop (old name fo PipelineArtifact)
- /// E.g. drop1
- ///
- public const String Drop = "Drop";
-
- ///
- /// Dedup'ed pipeline artifact
- /// E.g. artifact1
- ///
- public const String PipelineArtifact = "PipelineArtifact";
}
}
diff --git a/src/Sdk/BuildWebApi/Api/BuildDefinitionExtensions.cs b/src/Sdk/BuildWebApi/Api/BuildDefinitionExtensions.cs
deleted file mode 100644
index 756d38922..000000000
--- a/src/Sdk/BuildWebApi/Api/BuildDefinitionExtensions.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using GitHub.Services.Common;
-
-namespace GitHub.Build.WebApi
-{
- public static class BuildDefinitionExtensions
- {
- public static T GetProcess(
- this BuildDefinition definition) where T : BuildProcess
- {
- ArgumentUtility.CheckForNull(definition, nameof(definition));
- ArgumentUtility.CheckForNull(definition.Process, nameof(definition.Process));
- ArgumentUtility.CheckType(definition.Process, nameof(definition.Process), nameof(T));
-
- return definition.Process as T;
- }
- }
-}
diff --git a/src/Sdk/BuildWebApi/Api/BuildDefinitionHelpers.cs b/src/Sdk/BuildWebApi/Api/BuildDefinitionHelpers.cs
deleted file mode 100644
index c323b003b..000000000
--- a/src/Sdk/BuildWebApi/Api/BuildDefinitionHelpers.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using GitHub.Build.WebApi.Internals;
-using GitHub.Services.WebApi;
-using Newtonsoft.Json;
-
-namespace GitHub.Build.WebApi
-{
- public static class BuildDefinitionHelpers
- {
- public static BuildDefinition Deserialize(
- String definitionString)
- {
- var definition = JsonUtility.FromString(definitionString);
- if (definition?.Process == null)
- {
- var legacyDefinition = JsonConvert.DeserializeObject(definitionString);
- definition = legacyDefinition.ToBuildDefinition();
- }
-
- return definition;
- }
-
- public static BuildDefinitionTemplate GetTemplateFromStream(
- Stream stream)
- {
- String templateString;
- using (var reader = new StreamReader(stream, Encoding.UTF8, false, 1024, true))
- {
- templateString = reader.ReadToEnd();
- }
-
- var template = JsonConvert.DeserializeObject(templateString);
- if (template?.Template?.Process == null)
- {
- var legacyTemplate = JsonConvert.DeserializeObject(templateString);
- template = legacyTemplate.ToBuildDefinitionTemplate();
- }
-
- return template;
- }
- }
-}
diff --git a/src/Sdk/BuildWebApi/Api/BuildHttpClient.cs b/src/Sdk/BuildWebApi/Api/BuildHttpClient.cs
index f5f1f9014..ec76a5dde 100644
--- a/src/Sdk/BuildWebApi/Api/BuildHttpClient.cs
+++ b/src/Sdk/BuildWebApi/Api/BuildHttpClient.cs
@@ -57,1433 +57,5 @@ namespace GitHub.Build.WebApi
: base(baseUrl, pipeline, disposeHandler)
{
}
-
- ///
- /// [Preview API] Creates a new definition.
- ///
- /// The definition.
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- // this is just a convenient helper that uses the project id from the definition to call the API
- public virtual Task CreateDefinitionAsync(
- BuildDefinition definition,
- Int32? definitionToCloneId = null,
- Int32? definitionToCloneRevision = null,
- Object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- ArgumentUtility.CheckForNull(definition, "definition");
- ArgumentUtility.CheckForNull(definition.Project, "definition.Project");
- return base.CreateDefinitionAsync(definition, definition.Project.Id, definitionToCloneId, definitionToCloneRevision, userState, cancellationToken);
- }
-
- ///
- /// [Preview API] Updates an existing definition.
- ///
- /// The new version of the defintion.
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- // this is just a convenient helper that uses the project id from the definition to call the API
- public Task UpdateDefinitionAsync(
- BuildDefinition definition,
- Object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- return base.UpdateDefinitionAsync(definition, definition.Project.Id, definition.Id, null, null, userState, cancellationToken);
- }
-
- ///
- /// [Preview API] Queues a build
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- // this is just a convenient helper that uses the project id from the build to call the API
- public virtual Task QueueBuildAsync(
- Build build,
- Boolean? ignoreWarnings = null,
- String checkInTicket = null,
- Int32? sourceBuildId = null,
- Object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- ArgumentUtility.CheckForNull(build, "build");
- ArgumentUtility.CheckForNull(build.Project, "build.Project");
- return base.QueueBuildAsync(build, build.Project.Id, ignoreWarnings, checkInTicket, sourceBuildId, userState, cancellationToken);
- }
-
- ///
- /// [Preview API] Updates a build.
- ///
- /// The build.
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task UpdateBuildAsync(
- Build build,
- bool? retry = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- // the client generator produces methods with projectId and buildId parameters
- // since we can get those from the build, they're redundant and potentially ambiguous (who wins?)
- // so we generate it with protected access and provide this version that only accepts the Build
- ArgumentUtility.CheckForNull(build, "build");
- ArgumentUtility.CheckForNull(build.Project, "build.Project");
- return base.UpdateBuildAsync(build, build.Project.Id, build.Id, retry, userState, cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- return base.GetDefinitionsAsync(
- project,
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename,
- userState,
- cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- return base.GetDefinitionsAsync(
- project,
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename,
- userState,
- cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync2(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync2(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetDefinitionsAsync2(string) instead.")]
- public virtual Task> GetDefinitionsAsync2(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetFullDefinitionsAsync(string) instead.")]
- public virtual Task> GetFullDefinitionsAsync(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync2(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync2(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetFullDefinitionsAsync2(string) instead.")]
- public virtual Task> GetFullDefinitionsAsync2(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- int? processType = null,
- string yamlFilename = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true, // includeAllProperties
- includeLatestBuilds,
- taskIdFilter,
- processType,
- yamlFilename);
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets builds
- ///
- /// Project ID
- /// A comma-delimited list of definition ids
- /// A comma-delimited list of queue ids
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// A comma-delimited list of tags
- /// A comma-delimited list of properties to include in the results
- /// The maximum number of builds to retrieve
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public override Task> GetBuildsAsync(
- Guid project,
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- string repositoryId = null,
- string repositoryType = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- object routeValues = new { project = project };
-
- List> queryParams = GetBuildsQueryParams(
- definitions: definitions,
- queues: queues,
- buildNumber: buildNumber,
- minTime: minFinishTime,
- maxTime: maxFinishTime,
- requestedFor: requestedFor,
- reasonFilter: reasonFilter,
- statusFilter: statusFilter,
- resultFilter: resultFilter,
- tagFilters: tagFilters,
- properties: properties,
- top: top,
- continuationToken: continuationToken,
- maxBuildsPerDefinition: maxBuildsPerDefinition,
- deletedFilter: deletedFilter,
- queryOrder: queryOrder,
- branchName: branchName,
- buildIds: buildIds,
- repositoryId: repositoryId,
- repositoryType: repositoryType,
- userState: userState,
- cancellationToken: cancellationToken);
-
- return SendAsync>(
- httpMethod,
- s_getBuildsLocationId,
- routeValues: routeValues,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- public override Task> GetBuildsAsync(
- string project,
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- string repositoryId = null,
- string repositoryType = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- object routeValues = new { project = project };
-
- List> queryParams = GetBuildsQueryParams(
- definitions: definitions,
- queues: queues,
- buildNumber: buildNumber,
- minTime: minFinishTime,
- maxTime: maxFinishTime,
- requestedFor: requestedFor,
- reasonFilter: reasonFilter,
- statusFilter: statusFilter,
- resultFilter: resultFilter,
- tagFilters: tagFilters,
- properties: properties,
- top: top,
- continuationToken: continuationToken,
- maxBuildsPerDefinition: maxBuildsPerDefinition,
- deletedFilter: deletedFilter,
- queryOrder: queryOrder,
- branchName: branchName,
- buildIds: buildIds,
- repositoryId: repositoryId,
- repositoryType: repositoryType,
- userState: userState,
- cancellationToken: cancellationToken);
-
- return SendAsync>(
- httpMethod,
- s_getBuildsLocationId,
- routeValues: routeValues,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets builds
- ///
- /// Project ID
- /// A comma-delimited list of definition ids
- /// A comma-delimited list of queue ids
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// A comma-delimited list of tags
- /// A comma-delimited list of properties to include in the results
- /// The maximum number of builds to retrieve
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetBuildsAsync2(
- Guid project,
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- object routeValues = new { project = project };
-
- List> queryParams = GetBuildsQueryParams(
- definitions: definitions,
- queues: queues,
- buildNumber: buildNumber,
- minTime: minFinishTime,
- maxTime: maxFinishTime,
- requestedFor: requestedFor,
- reasonFilter: reasonFilter,
- statusFilter: statusFilter,
- resultFilter: resultFilter,
- tagFilters: tagFilters,
- properties: properties,
- top: top,
- continuationToken: continuationToken,
- maxBuildsPerDefinition: maxBuildsPerDefinition,
- deletedFilter: deletedFilter,
- queryOrder: queryOrder,
- branchName: branchName,
- buildIds: buildIds,
- userState: userState,
- cancellationToken: cancellationToken);
-
- return SendAsync>(
- httpMethod,
- s_getBuildsLocationId,
- routeValues: routeValues,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- public virtual Task> GetBuildsAsync2(
- string project,
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- object routeValues = new { project = project };
-
- List> queryParams = GetBuildsQueryParams(
- definitions: definitions,
- queues: queues,
- buildNumber: buildNumber,
- minTime: minFinishTime,
- maxTime: maxFinishTime,
- requestedFor: requestedFor,
- reasonFilter: reasonFilter,
- statusFilter: statusFilter,
- resultFilter: resultFilter,
- tagFilters: tagFilters,
- properties: properties,
- top: top,
- continuationToken: continuationToken,
- maxBuildsPerDefinition: maxBuildsPerDefinition,
- deletedFilter: deletedFilter,
- queryOrder: queryOrder,
- branchName: branchName,
- buildIds: buildIds,
- userState: userState,
- cancellationToken: cancellationToken);
-
- return SendAsync>(
- httpMethod,
- s_getBuildsLocationId,
- routeValues: routeValues,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets builds
- ///
- /// A comma-delimited list of definition ids
- /// A comma-delimited list of queue ids
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// A comma-delimited list of tags
- /// A comma-delimited list of properties to include in the results
- /// The maximum number of builds to retrieve
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetBuildsAsync2(
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
-
- List> queryParams = GetBuildsQueryParams(
- definitions: definitions,
- queues: queues,
- buildNumber: buildNumber,
- minTime: minFinishTime,
- maxTime: maxFinishTime,
- requestedFor: requestedFor,
- reasonFilter: reasonFilter,
- statusFilter: statusFilter,
- resultFilter: resultFilter,
- tagFilters: tagFilters,
- properties: properties,
- top: top,
- continuationToken: continuationToken,
- maxBuildsPerDefinition: maxBuildsPerDefinition,
- deletedFilter: deletedFilter,
- queryOrder: queryOrder,
- branchName: branchName,
- buildIds: buildIds,
- userState: userState,
- cancellationToken: cancellationToken);
-
- return SendAsync>(
- httpMethod,
- s_getBuildsLocationId,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
-
- ///
- /// [Preview API] The changes associated with a build
- ///
- /// Project ID or project name
- ///
- ///
- /// The maximum number of changes to return
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetBuildChangesAsync2(
- string project,
- int buildId,
- string continuationToken = null,
- int? top = null,
- bool? includeSourceChange = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("54572c7b-bbd3-45d4-80dc-28be08941620");
- object routeValues = new { project = project, buildId = buildId };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (includeSourceChange != null)
- {
- queryParams.Add("includeSourceChange", includeSourceChange.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_ChangesApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList);
- }
-
- ///
- /// [Preview API] The changes associated with a build
- ///
- /// Project ID
- ///
- ///
- /// The maximum number of changes to return
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetBuildChangesAsync2(
- Guid project,
- int buildId,
- string continuationToken = null,
- int? top = null,
- bool? includeSourceChange = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("54572c7b-bbd3-45d4-80dc-28be08941620");
- object routeValues = new { project = project, buildId = buildId };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (includeSourceChange != null)
- {
- queryParams.Add("includeSourceChange", includeSourceChange.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_ChangesApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList);
- }
-
- // this method does a compat check to see whether the server uses "minFinishTime" and "maxFinishTime" vs. "minTime" and "maxTime"
- private List> GetBuildsQueryParams(
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minTime = null,
- DateTime? maxTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- string repositoryId = null,
- string repositoryType = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- List> queryParams = new List>();
-
- // default to false to keep the existing behavior
- Boolean version4_1IsNotAvailable = true;
-
- // get latest version available on server
- // note we could await here and change all methods to async, however just for this one call, async/await overhead is probably not worth it, reconsider if we have more async calls
- ApiResourceLocation location = GetResourceLocationAsync(s_getBuildsLocationId, userState, cancellationToken).ConfigureAwait(false).GetAwaiter().GetResult();
- if (location != null)
- {
- if (location.MaxVersion >= s_BuildsApiVersion.ApiVersion)
- {
- // server has client's requested version 4.1 or greater
- version4_1IsNotAvailable = false;
- }
- }
-
- // in case the server doesn't support 3.x yet
- queryParams.Add("type", DefinitionType.Build.ToString());
-
- if (definitions != null && definitions.Any())
- {
- queryParams.Add("definitions", string.Join(",", definitions));
- }
- if (queues != null && queues.Any())
- {
- queryParams.Add("queues", string.Join(",", queues));
- }
- if (!string.IsNullOrEmpty(buildNumber))
- {
- queryParams.Add("buildNumber", buildNumber);
- }
-
- if (version4_1IsNotAvailable)
- {
- if (minTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minFinishTime", minTime.Value);
- }
- if (maxTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "maxFinishTime", maxTime.Value);
- }
- }
- else
- {
- if (minTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minTime", minTime.Value);
- }
- if (maxTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "maxTime", maxTime.Value);
- }
- }
-
- if (!string.IsNullOrEmpty(requestedFor))
- {
- queryParams.Add("requestedFor", requestedFor);
- }
- if (reasonFilter != null)
- {
- queryParams.Add("reasonFilter", reasonFilter.Value.ToString());
- }
- if (statusFilter != null)
- {
- queryParams.Add("statusFilter", statusFilter.Value.ToString());
- }
- if (resultFilter != null)
- {
- queryParams.Add("resultFilter", resultFilter.Value.ToString());
- }
- if (tagFilters != null && tagFilters.Any())
- {
- queryParams.Add("tagFilters", string.Join(",", tagFilters));
- }
- if (properties != null && properties.Any())
- {
- queryParams.Add("properties", string.Join(",", properties));
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (maxBuildsPerDefinition != null)
- {
- queryParams.Add("maxBuildsPerDefinition", maxBuildsPerDefinition.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (deletedFilter != null)
- {
- queryParams.Add("deletedFilter", deletedFilter.Value.ToString());
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (!string.IsNullOrEmpty(branchName))
- {
- queryParams.Add("branchName", branchName);
- }
- if (buildIds != null && buildIds.Any())
- {
- queryParams.Add("buildIds", string.Join(",", buildIds));
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
-
- return queryParams;
- }
-
- private string NormalizeJsonPatchPath(string key)
- {
- const string JsonPatchPathStartString = "/";
- if (key.StartsWith(JsonPatchPathStartString))
- {
- return key;
- }
-
- return string.Format("{0}{1}", JsonPatchPathStartString, key);
- }
-
- private static readonly ApiResourceVersion s_ChangesApiVersion = new ApiResourceVersion("4.1-preview.2");
- private static readonly Guid s_getBuildsLocationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
}
}
diff --git a/src/Sdk/BuildWebApi/Api/BuildHttpClientCompatBase.cs b/src/Sdk/BuildWebApi/Api/BuildHttpClientCompatBase.cs
deleted file mode 100644
index 7b83a7236..000000000
--- a/src/Sdk/BuildWebApi/Api/BuildHttpClientCompatBase.cs
+++ /dev/null
@@ -1,2463 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Net.Http;
-using System.Threading;
-using System.Threading.Tasks;
-using GitHub.Services.Common;
-using GitHub.Services.Common.Diagnostics;
-using GitHub.Services.WebApi;
-
-namespace GitHub.Build.WebApi
-{
- public abstract class BuildHttpClientCompatBase: VssHttpClientBase
- {
- public BuildHttpClientCompatBase(Uri baseUrl, VssCredentials credentials)
- : base(baseUrl, credentials)
- {
- }
-
- public BuildHttpClientCompatBase(Uri baseUrl, VssCredentials credentials, VssHttpRequestSettings settings)
- : base(baseUrl, credentials, settings)
- {
- }
-
- public BuildHttpClientCompatBase(Uri baseUrl, VssCredentials credentials, params DelegatingHandler[] handlers)
- : base(baseUrl, credentials, handlers)
- {
- }
-
- public BuildHttpClientCompatBase(Uri baseUrl, VssCredentials credentials, VssHttpRequestSettings settings, params DelegatingHandler[] handlers)
- : base(baseUrl, credentials, settings, handlers)
- {
- }
-
- public BuildHttpClientCompatBase(Uri baseUrl, HttpMessageHandler pipeline, bool disposeHandler)
- : base(baseUrl, pipeline, disposeHandler)
- {
- }
-
- [Obsolete]
- public virtual Task> GetBuildsAsync(
- string project,
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (definitions != null && definitions.Any())
- {
- queryParams.Add("definitions", string.Join(",", definitions));
- }
- if (queues != null && queues.Any())
- {
- queryParams.Add("queues", string.Join(",", queues));
- }
- if (!string.IsNullOrEmpty(buildNumber))
- {
- queryParams.Add("buildNumber", buildNumber);
- }
- if (minFinishTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minFinishTime", minFinishTime.Value);
- }
- if (maxFinishTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "maxFinishTime", maxFinishTime.Value);
- }
- if (!string.IsNullOrEmpty(requestedFor))
- {
- queryParams.Add("requestedFor", requestedFor);
- }
- if (reasonFilter != null)
- {
- queryParams.Add("reasonFilter", reasonFilter.Value.ToString());
- }
- if (statusFilter != null)
- {
- queryParams.Add("statusFilter", statusFilter.Value.ToString());
- }
- if (resultFilter != null)
- {
- queryParams.Add("resultFilter", resultFilter.Value.ToString());
- }
- if (tagFilters != null && tagFilters.Any())
- {
- queryParams.Add("tagFilters", string.Join(",", tagFilters));
- }
- if (properties != null && properties.Any())
- {
- queryParams.Add("properties", string.Join(",", properties));
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (maxBuildsPerDefinition != null)
- {
- queryParams.Add("maxBuildsPerDefinition", maxBuildsPerDefinition.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (deletedFilter != null)
- {
- queryParams.Add("deletedFilter", deletedFilter.Value.ToString());
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (!string.IsNullOrEmpty(branchName))
- {
- queryParams.Add("branchName", branchName);
- }
- if (buildIds != null && buildIds.Any())
- {
- queryParams.Add("buildIds", string.Join(",", buildIds));
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Queues a build
- ///
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task QueueBuildAsync(
- Build build,
- Guid project,
- bool? ignoreWarnings = null,
- string checkInTicket = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("POST");
- Guid locationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
- object routeValues = new { project = project };
- HttpContent content = new ObjectContent(build, new VssJsonMediaTypeFormatter(true));
-
- List> queryParams = new List>();
- if (ignoreWarnings != null)
- {
- queryParams.Add("ignoreWarnings", ignoreWarnings.Value.ToString());
- }
- if (!string.IsNullOrEmpty(checkInTicket))
- {
- queryParams.Add("checkInTicket", checkInTicket);
- }
-
- return SendAsync(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: new ApiResourceVersion("5.0-preview.4"),
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- content: content);
- }
-
- ///
- /// [Preview API] Queues a build
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task QueueBuildAsync(
- Build build,
- bool? ignoreWarnings = null,
- string checkInTicket = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("POST");
- Guid locationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
- HttpContent content = new ObjectContent(build, new VssJsonMediaTypeFormatter(true));
-
- List> queryParams = new List>();
- if (ignoreWarnings != null)
- {
- queryParams.Add("ignoreWarnings", ignoreWarnings.Value.ToString());
- }
- if (!string.IsNullOrEmpty(checkInTicket))
- {
- queryParams.Add("checkInTicket", checkInTicket);
- }
-
- return SendAsync(
- httpMethod,
- locationId,
- version: new ApiResourceVersion("5.0-preview.4"),
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- content: content);
- }
-
- ///
- /// [Preview API] Queues a build
- ///
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task QueueBuildAsync(
- Build build,
- string project,
- bool? ignoreWarnings = null,
- string checkInTicket = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("POST");
- Guid locationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
- object routeValues = new { project = project };
- HttpContent content = new ObjectContent(build, new VssJsonMediaTypeFormatter(true));
-
- List> queryParams = new List>();
- if (ignoreWarnings != null)
- {
- queryParams.Add("ignoreWarnings", ignoreWarnings.Value.ToString());
- }
- if (!string.IsNullOrEmpty(checkInTicket))
- {
- queryParams.Add("checkInTicket", checkInTicket);
- }
-
- return SendAsync(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: new ApiResourceVersion("5.0-preview.4"),
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- content: content);
- }
-
- ///
- /// [Preview API] Gets builds
- ///
- /// Project ID
- /// A comma-delimited list of definition ids
- /// A comma-delimited list of queue ids
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// A comma-delimited list of tags
- /// A comma-delimited list of properties to include in the results
- /// The maximum number of builds to retrieve
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetBuildsAsync(
- Guid project,
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (definitions != null && definitions.Any())
- {
- queryParams.Add("definitions", string.Join(",", definitions));
- }
- if (queues != null && queues.Any())
- {
- queryParams.Add("queues", string.Join(",", queues));
- }
- if (!string.IsNullOrEmpty(buildNumber))
- {
- queryParams.Add("buildNumber", buildNumber);
- }
- if (minFinishTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minFinishTime", minFinishTime.Value);
- }
- if (maxFinishTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "maxFinishTime", maxFinishTime.Value);
- }
- if (!string.IsNullOrEmpty(requestedFor))
- {
- queryParams.Add("requestedFor", requestedFor);
- }
- if (reasonFilter != null)
- {
- queryParams.Add("reasonFilter", reasonFilter.Value.ToString());
- }
- if (statusFilter != null)
- {
- queryParams.Add("statusFilter", statusFilter.Value.ToString());
- }
- if (resultFilter != null)
- {
- queryParams.Add("resultFilter", resultFilter.Value.ToString());
- }
- if (tagFilters != null && tagFilters.Any())
- {
- queryParams.Add("tagFilters", string.Join(",", tagFilters));
- }
- if (properties != null && properties.Any())
- {
- queryParams.Add("properties", string.Join(",", properties));
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (maxBuildsPerDefinition != null)
- {
- queryParams.Add("maxBuildsPerDefinition", maxBuildsPerDefinition.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (deletedFilter != null)
- {
- queryParams.Add("deletedFilter", deletedFilter.Value.ToString());
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (!string.IsNullOrEmpty(branchName))
- {
- queryParams.Add("branchName", branchName);
- }
- if (buildIds != null && buildIds.Any())
- {
- queryParams.Add("buildIds", string.Join(",", buildIds));
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets builds
- ///
- /// A comma-delimited list of definition ids
- /// A comma-delimited list of queue ids
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// A comma-delimited list of tags
- /// A comma-delimited list of properties to include in the results
- /// The maximum number of builds to retrieve
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetBuildsAsync(
- IEnumerable definitions = null,
- IEnumerable queues = null,
- string buildNumber = null,
- DateTime? minFinishTime = null,
- DateTime? maxFinishTime = null,
- string requestedFor = null,
- BuildReason? reasonFilter = null,
- BuildStatus? statusFilter = null,
- BuildResult? resultFilter = null,
- IEnumerable tagFilters = null,
- IEnumerable properties = null,
- int? top = null,
- string continuationToken = null,
- int? maxBuildsPerDefinition = null,
- QueryDeletedOption? deletedFilter = null,
- BuildQueryOrder? queryOrder = null,
- string branchName = null,
- IEnumerable buildIds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
-
- List> queryParams = new List>();
- if (definitions != null && definitions.Any())
- {
- queryParams.Add("definitions", string.Join(",", definitions));
- }
- if (queues != null && queues.Any())
- {
- queryParams.Add("queues", string.Join(",", queues));
- }
- if (!string.IsNullOrEmpty(buildNumber))
- {
- queryParams.Add("buildNumber", buildNumber);
- }
- if (minFinishTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minFinishTime", minFinishTime.Value);
- }
- if (maxFinishTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "maxFinishTime", maxFinishTime.Value);
- }
- if (!string.IsNullOrEmpty(requestedFor))
- {
- queryParams.Add("requestedFor", requestedFor);
- }
- if (reasonFilter != null)
- {
- queryParams.Add("reasonFilter", reasonFilter.Value.ToString());
- }
- if (statusFilter != null)
- {
- queryParams.Add("statusFilter", statusFilter.Value.ToString());
- }
- if (resultFilter != null)
- {
- queryParams.Add("resultFilter", resultFilter.Value.ToString());
- }
- if (tagFilters != null && tagFilters.Any())
- {
- queryParams.Add("tagFilters", string.Join(",", tagFilters));
- }
- if (properties != null && properties.Any())
- {
- queryParams.Add("properties", string.Join(",", properties));
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (maxBuildsPerDefinition != null)
- {
- queryParams.Add("maxBuildsPerDefinition", maxBuildsPerDefinition.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (deletedFilter != null)
- {
- queryParams.Add("deletedFilter", deletedFilter.Value.ToString());
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (!string.IsNullOrEmpty(branchName))
- {
- queryParams.Add("branchName", branchName);
- }
- if (buildIds != null && buildIds.Any())
- {
- queryParams.Add("buildIds", string.Join(",", buildIds));
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_BuildsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets a definition, optionally at a specific revision
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task GetDefinitionAsync(
- string project,
- int definitionId,
- int? revision = null,
- IEnumerable propertyFilters = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project, definitionId = definitionId };
-
- List> queryParams = new List>();
- if (revision != null)
- {
- queryParams.Add("revision", revision.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (propertyFilters != null && propertyFilters.Any())
- {
- queryParams.Add("propertyFilters", string.Join(",", propertyFilters));
- }
-
- return SendAsync(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets a definition, optionally at a specific revision
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task GetDefinitionAsync(
- Guid project,
- int definitionId,
- int? revision = null,
- IEnumerable propertyFilters = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project, definitionId = definitionId };
-
- List> queryParams = new List>();
- if (revision != null)
- {
- queryParams.Add("revision", revision.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (propertyFilters != null && propertyFilters.Any())
- {
- queryParams.Add("propertyFilters", string.Join(",", propertyFilters));
- }
-
- return SendAsync(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets a definition, optionally at a specific revision
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetDefinitionAsync(string, int) instead.")]
- public virtual Task GetDefinitionAsync(
- int definitionId,
- int? revision = null,
- IEnumerable propertyFilters = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { definitionId = definitionId };
-
- List> queryParams = new List>();
- if (revision != null)
- {
- queryParams.Add("revision", revision.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (propertyFilters != null && propertyFilters.Any())
- {
- queryParams.Add("propertyFilters", string.Join(",", propertyFilters));
- }
-
- return SendAsync(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetDefinitionsAsync(string) instead.")]
- public virtual Task> GetDefinitionsAsync(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- protected virtual Task> GetDefinitionsAsync(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeAllProperties = null,
- bool? includeLatestBuilds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
- if (includeAllProperties != null)
- {
- queryParams.Add("includeAllProperties", includeAllProperties.Value.ToString());
- }
- if (includeLatestBuilds != null)
- {
- queryParams.Add("includeLatestBuilds", includeLatestBuilds.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- protected virtual Task> GetDefinitionsAsync(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeAllProperties = null,
- bool? includeLatestBuilds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
- if (includeAllProperties != null)
- {
- queryParams.Add("includeAllProperties", includeAllProperties.Value.ToString());
- }
- if (includeLatestBuilds != null)
- {
- queryParams.Add("includeLatestBuilds", includeLatestBuilds.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetDefinitionsAsync(string) instead.")]
- protected virtual Task> GetDefinitionsAsync(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeAllProperties = null,
- bool? includeLatestBuilds = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
- if (includeAllProperties != null)
- {
- queryParams.Add("includeAllProperties", includeAllProperties.Value.ToString());
- }
- if (includeLatestBuilds != null)
- {
- queryParams.Add("includeLatestBuilds", includeLatestBuilds.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets a list of definitions.
- ///
- /// Project ID or project name
- /// If specified, filters to definitions whose names match this pattern.
- /// A repository ID. If specified, filters to definitions that use this repository.
- /// If specified, filters to definitions that have a repository of this type.
- /// Indicates the order in which definitions should be returned.
- /// The maximum number of definitions to return.
- /// A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
- /// If specified, indicates the date from which metrics should be included.
- /// A comma-delimited list that specifies the IDs of definitions to retrieve.
- /// If specified, filters to definitions under this folder.
- /// If specified, filters to definitions that have builds after this date.
- /// If specified, filters to definitions that do not have builds after this date.
- /// Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
- /// Indicates whether to return the latest and latest completed builds for this definition.
- /// If specified, filters to definitions that use the specified task.
- ///
- /// The cancellation token to cancel operation.
- protected virtual Task> GetDefinitionsAsync(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeAllProperties = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
- if (includeAllProperties != null)
- {
- queryParams.Add("includeAllProperties", includeAllProperties.Value.ToString());
- }
- if (includeLatestBuilds != null)
- {
- queryParams.Add("includeLatestBuilds", includeLatestBuilds.Value.ToString());
- }
- if (taskIdFilter != null)
- {
- queryParams.Add("taskIdFilter", taskIdFilter.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: new ApiResourceVersion("5.0-preview.6"),
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets a list of definitions.
- ///
- /// Project ID
- /// If specified, filters to definitions whose names match this pattern.
- /// A repository ID. If specified, filters to definitions that use this repository.
- /// If specified, filters to definitions that have a repository of this type.
- /// Indicates the order in which definitions should be returned.
- /// The maximum number of definitions to return.
- /// A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
- /// If specified, indicates the date from which metrics should be included.
- /// A comma-delimited list that specifies the IDs of definitions to retrieve.
- /// If specified, filters to definitions under this folder.
- /// If specified, filters to definitions that have builds after this date.
- /// If specified, filters to definitions that do not have builds after this date.
- /// Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
- /// Indicates whether to return the latest and latest completed builds for this definition.
- /// If specified, filters to definitions that use the specified task.
- ///
- /// The cancellation token to cancel operation.
- protected virtual Task> GetDefinitionsAsync(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeAllProperties = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
- if (includeAllProperties != null)
- {
- queryParams.Add("includeAllProperties", includeAllProperties.Value.ToString());
- }
- if (includeLatestBuilds != null)
- {
- queryParams.Add("includeLatestBuilds", includeLatestBuilds.Value.ToString());
- }
- if (taskIdFilter != null)
- {
- queryParams.Add("taskIdFilter", taskIdFilter.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: new ApiResourceVersion("5.0-preview.6"),
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets a list of definitions.
- ///
- /// If specified, filters to definitions whose names match this pattern.
- /// A repository ID. If specified, filters to definitions that use this repository.
- /// If specified, filters to definitions that have a repository of this type.
- /// Indicates the order in which definitions should be returned.
- /// The maximum number of definitions to return.
- /// A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
- /// If specified, indicates the date from which metrics should be included.
- /// A comma-delimited list that specifies the IDs of definitions to retrieve.
- /// If specified, filters to definitions under this folder.
- /// If specified, filters to definitions that have builds after this date.
- /// If specified, filters to definitions that do not have builds after this date.
- /// Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
- /// Indicates whether to return the latest and latest completed builds for this definition.
- /// If specified, filters to definitions that use the specified task.
- ///
- /// The cancellation token to cancel operation.
- protected virtual Task> GetDefinitionsAsync(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTime = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- bool? includeAllProperties = null,
- bool? includeLatestBuilds = null,
- Guid? taskIdFilter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = new List>();
- if (!string.IsNullOrEmpty(name))
- {
- queryParams.Add("name", name);
- }
- if (!string.IsNullOrEmpty(repositoryId))
- {
- queryParams.Add("repositoryId", repositoryId);
- }
- if (!string.IsNullOrEmpty(repositoryType))
- {
- queryParams.Add("repositoryType", repositoryType);
- }
- if (queryOrder != null)
- {
- queryParams.Add("queryOrder", queryOrder.Value.ToString());
- }
- if (top != null)
- {
- queryParams.Add("$top", top.Value.ToString(CultureInfo.InvariantCulture));
- }
- if (!string.IsNullOrEmpty(continuationToken))
- {
- queryParams.Add("continuationToken", continuationToken);
- }
- if (minMetricsTime != null)
- {
- AddDateTimeToQueryParams(queryParams, "minMetricsTime", minMetricsTime.Value);
- }
- if (definitionIds != null && definitionIds.Any())
- {
- queryParams.Add("definitionIds", string.Join(",", definitionIds));
- }
- if (!string.IsNullOrEmpty(path))
- {
- queryParams.Add("path", path);
- }
- if (builtAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "builtAfter", builtAfter.Value);
- }
- if (notBuiltAfter != null)
- {
- AddDateTimeToQueryParams(queryParams, "notBuiltAfter", notBuiltAfter.Value);
- }
- if (includeAllProperties != null)
- {
- queryParams.Add("includeAllProperties", includeAllProperties.Value.ToString());
- }
- if (includeLatestBuilds != null)
- {
- queryParams.Add("includeLatestBuilds", includeLatestBuilds.Value.ToString());
- }
- if (taskIdFilter != null)
- {
- queryParams.Add("taskIdFilter", taskIdFilter.Value.ToString());
- }
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: new ApiResourceVersion("5.0-preview.6"),
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken);
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync2(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetDefinitionsAsync2(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetDefinitionsAsync2(string) instead.")]
- public virtual Task> GetDefinitionsAsync2(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- false);
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- [Obsolete("Use GetFullDefinitionsAsync(string) instead.")]
- public virtual Task> GetFullDefinitionsAsync(
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true);
-
- return SendAsync>(
- httpMethod,
- locationId,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID or project name
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync2(
- string project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- string path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true);
-
- return SendAsync>(
- httpMethod,
- locationId,
- routeValues: routeValues,
- version: s_DefinitionsApiVersion,
- queryParameters: queryParams,
- userState: userState,
- cancellationToken: cancellationToken,
- processResponse: GetPagedList
- );
- }
-
- ///
- /// [Preview API] Gets definitions, optionally filtered by name
- ///
- /// Project ID
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token to cancel operation.
- public virtual Task> GetFullDefinitionsAsync2(
- Guid project,
- string name = null,
- string repositoryId = null,
- string repositoryType = null,
- DefinitionQueryOrder? queryOrder = null,
- int? top = null,
- string continuationToken = null,
- DateTime? minMetricsTimeInUtc = null,
- IEnumerable definitionIds = null,
- String path = null,
- DateTime? builtAfter = null,
- DateTime? notBuiltAfter = null,
- object userState = null,
- CancellationToken cancellationToken = default(CancellationToken))
- {
- HttpMethod httpMethod = new HttpMethod("GET");
- Guid locationId = new Guid("dbeaf647-6167-421a-bda9-c9327b25e2e6");
- object routeValues = new { project = project };
-
- List> queryParams = GetDefinitionsQueryParams(
- name,
- repositoryId,
- repositoryType,
- queryOrder,
- top,
- continuationToken,
- minMetricsTimeInUtc,
- definitionIds,
- path,
- builtAfter,
- notBuiltAfter,
- true);
-
- return SendAsync