diff --git a/src/Speckle.Objects/Interfaces.cs b/src/Speckle.Objects/Interfaces.cs index b2df1903..5d41a500 100644 --- a/src/Speckle.Objects/Interfaces.cs +++ b/src/Speckle.Objects/Interfaces.cs @@ -2,6 +2,7 @@ using Speckle.Objects.Geometry; using Speckle.Objects.Other; using Speckle.Objects.Primitive; using Speckle.Sdk.Models; +using Speckle.Sdk.Models.Proxies; namespace Speckle.Objects; @@ -110,15 +111,7 @@ public interface IDisplayValue : ISpeckleObject #region Data objects -/// -/// Specifies properties on objects to be used for data-based workflows -/// -public interface IProperties : ISpeckleObject -{ - Dictionary properties { get; } -} - -public interface IDataObject : IProperties, IDisplayValue> +public interface IDataObject : IProperties, IDisplayValue>, ISpeckleObject { /// /// The name of the object, primarily used to decorate the object for consumption in frontend and other apps diff --git a/src/Speckle.Sdk/Models/Collections/RootCollection.cs b/src/Speckle.Sdk/Models/Collections/RootCollection.cs index ace5979c..7082ba6b 100644 --- a/src/Speckle.Sdk/Models/Collections/RootCollection.cs +++ b/src/Speckle.Sdk/Models/Collections/RootCollection.cs @@ -1,3 +1,5 @@ +using Speckle.Sdk.Models.Proxies; + namespace Speckle.Sdk.Models.Collections; /// @@ -5,7 +7,7 @@ namespace Speckle.Sdk.Models.Collections; /// Extends Collection to include model-wide properties that apply to the entire model. /// [SpeckleType("Speckle.Core.Models.Collections.RootCollection")] -public class RootCollection : Collection +public class RootCollection : Collection, IProperties { public RootCollection() { } @@ -15,8 +17,5 @@ public class RootCollection : Collection /// /// Model-wide properties that apply to the entire model. /// - /// - /// These are intended for model-level metadata such as total area, project information, or analysis results. - /// - public Dictionary? properties { get; set; } + public Dictionary properties { get; set; } = new(); } diff --git a/src/Speckle.Sdk/Models/Proxies/IProperties.cs b/src/Speckle.Sdk/Models/Proxies/IProperties.cs new file mode 100644 index 00000000..1a1fc252 --- /dev/null +++ b/src/Speckle.Sdk/Models/Proxies/IProperties.cs @@ -0,0 +1,10 @@ +namespace Speckle.Sdk.Models.Proxies; + +/// +/// Specifies properties on objects to be used for data-based workflows. +/// Can be applied to both objects and collections. +/// +public interface IProperties +{ + Dictionary properties { get; } +}