From d65993389bd05264157cddf02bfc5df0c22ea75c Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:29:40 +0000 Subject: [PATCH] Obsolete warnings (#156) --- .editorconfig | 2 -- src/Speckle.Objects/GIS/RasterLayer.cs | 5 ----- src/Speckle.Objects/GIS/VectorLayer.cs | 1 - src/Speckle.Sdk/Api/GraphQL/Resources/VersionResource.cs | 2 +- src/Speckle.Sdk/Models/DynamicBase.cs | 1 - 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7609a88d..0a293a7d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -257,8 +257,6 @@ dotnet_diagnostic.ca1509.severity = warning # Invalid entry in code metrics conf dotnet_diagnostic.ca1861.severity = none # Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1861) dotnet_diagnostic.cs8618.severity = suggestion # nullable problem -dotnet_diagnostic.CS0809.severity = suggestion # obsolete errors -dotnet_diagnostic.CS0618.severity = suggestion # obsolete errors # Performance rules diff --git a/src/Speckle.Objects/GIS/RasterLayer.cs b/src/Speckle.Objects/GIS/RasterLayer.cs index 71ef4b71..d0240cf9 100644 --- a/src/Speckle.Objects/GIS/RasterLayer.cs +++ b/src/Speckle.Objects/GIS/RasterLayer.cs @@ -11,9 +11,4 @@ public class RasterLayer : Collection public CRS? rasterCrs { get; set; } public string? geomType { get; set; } public Dictionary? renderer { get; set; } - - public RasterLayer() - { - collectionType = "RasterLayer"; - } } diff --git a/src/Speckle.Objects/GIS/VectorLayer.cs b/src/Speckle.Objects/GIS/VectorLayer.cs index dee18f19..80673982 100644 --- a/src/Speckle.Objects/GIS/VectorLayer.cs +++ b/src/Speckle.Objects/GIS/VectorLayer.cs @@ -15,7 +15,6 @@ public class VectorLayer : Collection public VectorLayer() { - collectionType = "VectorLayer"; attributes = new Base(); } } diff --git a/src/Speckle.Sdk/Api/GraphQL/Resources/VersionResource.cs b/src/Speckle.Sdk/Api/GraphQL/Resources/VersionResource.cs index 2188a185..b7d65756 100644 --- a/src/Speckle.Sdk/Api/GraphQL/Resources/VersionResource.cs +++ b/src/Speckle.Sdk/Api/GraphQL/Resources/VersionResource.cs @@ -256,7 +256,7 @@ public sealed class VersionResource return response.data.data; } - [Obsolete("modelId is no longer required, use the overload that doesn't specify a model id")] + [Obsolete("modelId is no longer required, use the overload that doesn't specify a model id", true)] public Task Get( string versionId, string modelId, diff --git a/src/Speckle.Sdk/Models/DynamicBase.cs b/src/Speckle.Sdk/Models/DynamicBase.cs index 6f6f3ad3..483bda4a 100644 --- a/src/Speckle.Sdk/Models/DynamicBase.cs +++ b/src/Speckle.Sdk/Models/DynamicBase.cs @@ -165,7 +165,6 @@ public class DynamicBase : DynamicObject, IDynamicMetaObjectProvider /// /// Gets all of the property names on this class, dynamic or not. /// - [Obsolete("Use `GetMembers(DynamicBaseMemberType.All).Keys` instead")] public override IEnumerable GetDynamicMemberNames() { var pinfos = TypeLoader.GetBaseProperties(GetType());