Method RentOrCreate
RentOrCreate()
Rents the current instance of the shared resource or creates a new one if necessary.
Declaration
public T RentOrCreate()
Returns
| Type | Description |
|---|---|
| T | The rented instance of the shared resource. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when a newly created instance cannot be rented. |