ReusableResourceStore<TResource,TConstructorParameter>.Acquire Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Acquires a cached instance of the resource, or allocates a new instance if none are currently available.
public:
Microsoft::VisualStudio::Utilities::ReusableResourceHolder<TResource> Acquire(TConstructorParameter constructorParameter);
public Microsoft.VisualStudio.Utilities.ReusableResourceHolder<TResource> Acquire (TConstructorParameter constructorParameter);
member this.Acquire : 'ConstructorParameter -> Microsoft.VisualStudio.Utilities.ReusableResourceHolder<'Resource (requires 'Resource : null)>
Public Function Acquire (constructorParameter As TConstructorParameter) As ReusableResourceHolder(Of TResource)
Parameters
- constructorParameter
- TConstructorParameter
The parameter to pass when constructing the object.
Returns
A disposable object that should be disposed when usage of the resource is complete.