diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs index 2fc34204..2d5db8e2 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs @@ -51,13 +51,32 @@ partial class PixelShaderEffect /// /// Gets the object associated with the current instance. /// - public SourceCollection Sources { get; } = new(); + public SourceCollection Sources { get; } + + /// + /// Gets the object associated with the current instance. + /// + public ResourceTextureManagerCollection ResourceTextureManagers { get; } /// /// Represents the collection of sources in a instance. /// public sealed class SourceCollection { + /// + /// Creates a new instance with the specified parameters. + /// + /// The owning instance. + internal SourceCollection(PixelShaderEffect owner) + { + Owner = owner; + } + + /// + /// The owning instance. + /// + internal PixelShaderEffect Owner { get; } + /// /// Gets or sets the source at a specified index. /// @@ -70,4 +89,38 @@ partial class PixelShaderEffect set { } } } + + /// + /// Represents the collection of objects in a instance. + /// + public sealed class ResourceTextureManagerCollection + { + /// + /// Creates a new instance with the specified parameters. + /// + /// The owning instance. + internal ResourceTextureManagerCollection(PixelShaderEffect owner) + { + Owner = owner; + } + + /// + /// The owning instance. + /// + internal PixelShaderEffect Owner { get; } + + /// + /// Gets or sets the object at a specified index. + /// + /// The index of the source to get or set. + /// The object at the specified index. + /// Thrown if the value is set to . + /// Thrown if is not a valid index for the current effect. + [DisallowNull] + public D2D1ResourceTextureManager this[int index] + { + get => null!; + set { } + } + } } \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ReferenceTracking.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ReferenceTracking.cs index 49ca9198..9ff4da45 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ReferenceTracking.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ReferenceTracking.cs @@ -7,14 +7,6 @@ namespace ComputeSharp.D2D1.Uwp; /// partial class PixelShaderEffect { - /// - /// Creates a new instance. - /// - public PixelShaderEffect() - { - this.referenceTracker = new(); - } - /// /// Releases unmanaged resources and performs other cleanup operations. /// diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs index b98ef02e..24264553 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs @@ -63,4 +63,15 @@ public sealed partial class PixelShaderEffect : IReferenceTrackedObject, ICan /// The backing field for . /// private D2D1_BUFFER_PRECISION d2D1BufferPrecision; + + /// + /// Creates a new instance. + /// + public PixelShaderEffect() + { + this.referenceTracker = new ReferenceTracker(this); + + Sources = new SourceCollection(this); + ResourceTextureManagers = new ResourceTextureManagerCollection(this); + } } \ No newline at end of file