From afb89cdef5b23c3730b4cf9e8168137bcf5c3aff Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Wed, 14 Sep 2016 19:51:43 +1000 Subject: [PATCH] Removed obsolete attributes on Machine resources, replaced with issue #84 --- source/Octo/project.json | 5 +---- .../Octopus.Client/Model/DeploymentTemplateStep.cs | 4 +++- source/Octopus.Client/Model/MachineModelStatus.cs | 4 +++- source/Octopus.Client/Model/MachineResource.cs | 13 ++++++++++--- source/Octopus.Client/Model/ScopeValue.cs | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/source/Octo/project.json b/source/Octo/project.json index 12279d473..f74eae365 100644 --- a/source/Octo/project.json +++ b/source/Octo/project.json @@ -35,10 +35,7 @@ "debugType": "portable", "emitEntryPoint": true, "outputName": "Octo", - "warningsAsErrors": true, - "nowarn": [ - "CS0612" // Obsolete - ] + "warningsAsErrors": true }, "configurations": { "Release": { diff --git a/source/Octopus.Client/Model/DeploymentTemplateStep.cs b/source/Octopus.Client/Model/DeploymentTemplateStep.cs index 8937b78c6..59c1c23ba 100644 --- a/source/Octopus.Client/Model/DeploymentTemplateStep.cs +++ b/source/Octopus.Client/Model/DeploymentTemplateStep.cs @@ -9,7 +9,9 @@ public class DeploymentTemplateStep public string ActionNumber { get; set; } public string[] Roles { get; set; } - [Obsolete] // TODO: [ObsoleteEx(TreatAsErrorFromVersion = "4.0", RemoveInVersion = "4.0", ReplacementTypeOrMember = "Machines")] + /// + /// Obsoleted as Server 3.4 + /// public string[] MachineNames { get; set; } public MachineDeploymentPreview[] Machines { get; set; } diff --git a/source/Octopus.Client/Model/MachineModelStatus.cs b/source/Octopus.Client/Model/MachineModelStatus.cs index 27fc2e216..fe61b42f4 100644 --- a/source/Octopus.Client/Model/MachineModelStatus.cs +++ b/source/Octopus.Client/Model/MachineModelStatus.cs @@ -2,7 +2,9 @@ namespace Octopus.Client.Model { - [Obsolete] // TODO: [ObsoleteEx(TreatAsErrorFromVersion = "4.0", RemoveInVersion = "4.0", ReplacementTypeOrMember = "MachineModelHealthStatus")] + /// + /// Obsoleted as Server 3.4 + /// public enum MachineModelStatus { Online, diff --git a/source/Octopus.Client/Model/MachineResource.cs b/source/Octopus.Client/Model/MachineResource.cs index 3c0c436ff..deca3e7dc 100644 --- a/source/Octopus.Client/Model/MachineResource.cs +++ b/source/Octopus.Client/Model/MachineResource.cs @@ -17,14 +17,18 @@ public MachineResource() [Writeable] public string Name { get; set; } + /// + /// Obsoleted as Server 3.4 + /// [Trim] [Writeable] - [Obsolete] // TODO: [ObsoleteEx(Message = "The Thumbprint property is not supported by all deployment target types; for Tentacle-based deployment targets, use Endpoint.Thumbprint instead.", TreatAsErrorFromVersion = "4.0", RemoveInVersion = "4.0")] public string Thumbprint { get; set; } + /// + /// Obsoleted as Server 3.4 + /// [Trim] [Writeable] - [Obsolete] // TODO: [ObsoleteEx(Message = "The Uri property is not supported by all deployment target types; use corresponding properties of Endpoint instead.", TreatAsErrorFromVersion = "4.0", RemoveInVersion = "4.0")] public string Uri { get; set; } [Writeable] @@ -45,7 +49,10 @@ public MachineResource() [Writeable] public ReferenceCollection TenantTags { get; set; } - [Obsolete] // TODO: [ObsoleteEx(TreatAsErrorFromVersion = "4.0", RemoveInVersion = "4.0", ReplacementTypeOrMember = "HealthStatus")] + + /// + /// Obsoleted as Server 3.4 + /// public MachineModelStatus Status { get; set; } public MachineModelHealthStatus HealthStatus { get; set; } diff --git a/source/Octopus.Client/Model/ScopeValue.cs b/source/Octopus.Client/Model/ScopeValue.cs index 49d9d2521..3e3d5f91f 100644 --- a/source/Octopus.Client/Model/ScopeValue.cs +++ b/source/Octopus.Client/Model/ScopeValue.cs @@ -6,7 +6,7 @@ namespace Octopus.Client.Model { public class ScopeValue : ReferenceCollection { - [Obsolete] // TODO: [ObsoleteEx(Message = "For persistence only", TreatAsErrorFromVersion = "3.0")] + [Obsolete("For serialization only")] public ScopeValue() { }