From b6a56eb759b6911285b271b13442c0aa8e675691 Mon Sep 17 00:00:00 2001 From: Bert Cotton Date: Fri, 4 Aug 2017 13:36:31 -0600 Subject: [PATCH] Added missing models --- .gitignore | 1 + .../Models/Releases/Artifact.cs | 19 +++++++++++ .../Models/Releases/DefinitionReference.cs | 17 ++++++++++ .../Models/Releases/IdNameReference.cs | 13 +++++++ .../Models/Releases/ReleaseDefinition.cs | 34 +++++++++++++++++++ .../Models/Releases/ReleaseLink.cs | 14 ++++++++ .../Models/Releases/User.cs | 18 ++++++++++ .../Tasks/RepositoryUpdater.cs | 2 +- 8 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 src/TfsAdvanced.Updater/Models/Releases/Artifact.cs create mode 100644 src/TfsAdvanced.Updater/Models/Releases/DefinitionReference.cs create mode 100644 src/TfsAdvanced.Updater/Models/Releases/IdNameReference.cs create mode 100644 src/TfsAdvanced.Updater/Models/Releases/ReleaseDefinition.cs create mode 100644 src/TfsAdvanced.Updater/Models/Releases/ReleaseLink.cs create mode 100644 src/TfsAdvanced.Updater/Models/Releases/User.cs diff --git a/.gitignore b/.gitignore index bb5a43a..84bd6b6 100644 --- a/.gitignore +++ b/.gitignore @@ -236,6 +236,7 @@ src/*/wwwroot/lib/ src/*/wwwroot/fonts/ src/*/wwwroot/_references.js +!src/**/Models/Releases/ node_modules/ diff --git a/src/TfsAdvanced.Updater/Models/Releases/Artifact.cs b/src/TfsAdvanced.Updater/Models/Releases/Artifact.cs new file mode 100644 index 0000000..518ba49 --- /dev/null +++ b/src/TfsAdvanced.Updater/Models/Releases/Artifact.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TFSAdvanced.Updater.Models.Releases +{ + public class Artifact + { + public string sourceId { get; set; } + + public string type { get; set; } + + public string alias { get; set; } + + public DefinitionReference definitionReference { get; set; } + + public bool isPrimary { get; set; } + } +} diff --git a/src/TfsAdvanced.Updater/Models/Releases/DefinitionReference.cs b/src/TfsAdvanced.Updater/Models/Releases/DefinitionReference.cs new file mode 100644 index 0000000..b6e34fc --- /dev/null +++ b/src/TfsAdvanced.Updater/Models/Releases/DefinitionReference.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TFSAdvanced.Updater.Models.Releases +{ + public class DefinitionReference + { + public IdNameReference artifactSourceDefinitionUrl { get; set; } + + public IdNameReference definition { get; set; } + + public IdNameReference project { get; set; } + + public IdNameReference defaultVersionType { get; set; } + } +} diff --git a/src/TfsAdvanced.Updater/Models/Releases/IdNameReference.cs b/src/TfsAdvanced.Updater/Models/Releases/IdNameReference.cs new file mode 100644 index 0000000..8092cdb --- /dev/null +++ b/src/TfsAdvanced.Updater/Models/Releases/IdNameReference.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TFSAdvanced.Updater.Models.Releases +{ + public class IdNameReference + { + public string id { get; set; } + + public string name { get; set; } + } +} diff --git a/src/TfsAdvanced.Updater/Models/Releases/ReleaseDefinition.cs b/src/TfsAdvanced.Updater/Models/Releases/ReleaseDefinition.cs new file mode 100644 index 0000000..51fbe12 --- /dev/null +++ b/src/TfsAdvanced.Updater/Models/Releases/ReleaseDefinition.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TFSAdvanced.Updater.Models.Releases +{ + public class ReleaseDefinition + { + + public int id { get; set; } + + public string source { get; set; } + + public int revision { get; set; } + + public string name { get; set; } + + public User createdBy { get; set; } + + public DateTime createdOn { get; set; } + + public User modifiedBy { get; set; } + + public DateTime modifiedOn { get; set; } + + public Artifact[] artifacts { get; set; } + + public string releaseNameFormat { get; set; } + + public ReleaseLink _links { get; set; } + + public string url { get; set; } + } +} diff --git a/src/TfsAdvanced.Updater/Models/Releases/ReleaseLink.cs b/src/TfsAdvanced.Updater/Models/Releases/ReleaseLink.cs new file mode 100644 index 0000000..25878bd --- /dev/null +++ b/src/TfsAdvanced.Updater/Models/Releases/ReleaseLink.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; +using TfsAdvanced.Models; + +namespace TFSAdvanced.Updater.Models.Releases +{ + public class ReleaseLink + { + public HrefLink self { get; set; } + + public HrefLink web { get; set; } + } +} diff --git a/src/TfsAdvanced.Updater/Models/Releases/User.cs b/src/TfsAdvanced.Updater/Models/Releases/User.cs new file mode 100644 index 0000000..a8e4e25 --- /dev/null +++ b/src/TfsAdvanced.Updater/Models/Releases/User.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TFSAdvanced.Updater.Models.Releases +{ + public class User + { + public string id { get; set; } + + public string displayName { get; set; } + + public string uniqueuName { get; set; } + + public string imageUrl { get; set; } + + } +} diff --git a/src/TfsAdvanced.Updater/Tasks/RepositoryUpdater.cs b/src/TfsAdvanced.Updater/Tasks/RepositoryUpdater.cs index 41f2129..f0b0556 100644 --- a/src/TfsAdvanced.Updater/Tasks/RepositoryUpdater.cs +++ b/src/TfsAdvanced.Updater/Tasks/RepositoryUpdater.cs @@ -2,7 +2,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; using Hangfire; using TfsAdvanced.DataStore.Repository; using TfsAdvanced.Models;