Class D2D1Resource
The root interface for all resources in D2D.
Inheritance
D2D1Resource
Inherited Members
Namespace: JeremyAnsel.DirectX.D2D1
Assembly: JeremyAnsel.DirectX.D2D1.dll
Syntax
[SuppressMessage("Design", "CA1063:Implémenter IDisposable correctement", Justification = "Reviewed")]
public abstract class D2D1Resource : IDisposable, ID2D1Releasable
Properties
| Edit this page View SourceHandle
Gets an handle representing the D2D1 object interface.
Declaration
public abstract object Handle { get; }
Property Value
| Type | Description |
|---|---|
| object |
Methods
| Edit this page View SourceDispose()
Immediately releases the unmanaged resources used by the D2D1Resource object.
Declaration
[SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Usage", "CA1816:CallGCSuppressFinalizeCorrectly", Justification = "Reviewed")]
public void Dispose()
GetFactory()
Retrieve the factory associated with this resource.
Declaration
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Reviewed")]
[SuppressMessage("Reliability", "CA2010:Toujours consommer la valeur retournée par les méthodes marquées avec PreserveSigAttribute", Justification = "Reviewed.")]
public D2D1Factory? GetFactory()
Returns
| Type | Description |
|---|---|
| D2D1Factory | The factory that created this resource. |
Release()
Releases the managed reference to the COM D2D1 interface.
Declaration
public void Release()
ToBoolean()
Gets a boolean indicating if the handle is not null.
Declaration
public bool ToBoolean()
Returns
| Type | Description |
|---|---|
| bool | A boolean |
Operators
| Edit this page View Sourceimplicit operator bool(D2D1Resource?)
Gets a boolean indicating if the handle is not null.
Declaration
public static implicit operator bool(D2D1Resource? value)
Parameters
| Type | Name | Description |
|---|---|---|
| D2D1Resource | value | A D2D1 object. |
Returns
| Type | Description |
|---|---|
| bool | A boolean |