Class CloudOrganizationProvider
A class that provides access to a user's organizations.
Inherited Members
Namespace: Unity.Cloud.Assets
Syntax
public sealed class CloudOrganizationProvider : IOrganizationProvider
Constructors
CloudOrganizationProvider(IServiceHttpClient, IServiceHostResolver)
Initializes a new instance of the CloudOrganizationProvider class.
Declaration
public CloudOrganizationProvider(IServiceHttpClient serviceHttpClient, IServiceHostResolver serviceHostResolver)
Parameters
Type | Name | Description |
---|---|---|
IServiceHttpClient | serviceHttpClient | The IServiceHttpClient used to fetch the data. |
IServiceHostResolver | serviceHostResolver | The IServiceHostResolver object. |
Methods
GetOrganizationsAsync(CancellationToken)
Implement this method to get the collection of IOrganization the current user belongs to.
Declaration
public async Task<IOrganization[]> GetOrganizationsAsync(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token |
Returns
Type | Description |
---|---|
Task<IOrganization[]> | A task whose result is an array of IOrganization. |