Class TableauApiEndpointBase
IMigrationEndpoint impelementation that uses Tableau Server/Cloud APIs.
Namespace: Tableau.Migration.Engine.Endpoints
Assembly: Tableau.Migration.dll
Syntax
public abstract class TableauApiEndpointBase : IMigrationApiEndpoint, IMigrationEndpoint, IAsyncDisposable
Constructors
TableauApiEndpointBase(IServiceScopeFactory, ITableauApiEndpointConfiguration, IContentReferenceFinderFactory, IContentFileStore, ISharedResourcesLocalizer)
Creates a new TableauApiEndpointBase object.
Declaration
public TableauApiEndpointBase(IServiceScopeFactory serviceScopeFactory, ITableauApiEndpointConfiguration config, IContentReferenceFinderFactory finderFactory, IContentFileStore fileStore, ISharedResourcesLocalizer localizer)
Parameters
Type | Name | Description |
---|---|---|
IServiceScopeFactory | serviceScopeFactory | A service scope factory to define an API client scope with. |
ITableauApiEndpointConfiguration | config | The configuration options for connecting to the endpoint APIs. |
IContentReferenceFinderFactory | finderFactory | The content finder factory to supply to the API client. |
IContentFileStore | fileStore | The file store to use. |
ISharedResourcesLocalizer | localizer | A string localizer. |
Fields
EndpointScope
The per-endpoint dependency injection scope.
Declaration
protected readonly AsyncServiceScope EndpointScope
Field Value
Type | Description |
---|---|
AsyncServiceScope |
ServerApi
The server-level API client.
Declaration
protected readonly IApiClient ServerApi
Field Value
Type | Description |
---|---|
IApiClient |
Properties
SiteApi
Gets the site-level API client.
Declaration
public ISitesApiClient SiteApi { get; }
Property Value
Type | Description |
---|---|
ISitesApiClient |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | If the endpoint has not been initialized or site sign in failed. |
Methods
DisposeAsync()
Disposes the result's value.
Declaration
public ValueTask DisposeAsync()
Returns
Type | Description |
---|---|
ValueTask |
GetPager<TContent>(int)
Gets a pager to list all the content the user has access to.
Declaration
public IPager<TContent> GetPager<TContent>(int pageSize)
Parameters
Type | Name | Description |
---|---|---|
int | pageSize | The page size to use. |
Returns
Type | Description |
---|---|
IPager<TContent> | A pager to list content with. |
Type Parameters
Name | Description |
---|---|
TContent | The content type. |
GetPermissionsAsync(Type, IContentReference, CancellationToken)
Declaration
public Task<IResult<IPermissions>> GetPermissionsAsync(Type type, IContentReference contentItem, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Type | type | |
IContentReference | contentItem | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<IResult<IPermissions>> |
GetPermissionsAsync<TContent>(IContentReference, CancellationToken)
Declaration
public Task<IResult<IPermissions>> GetPermissionsAsync<TContent>(IContentReference contentItem, CancellationToken cancel) where TContent : IPermissionsContent
Parameters
Type | Name | Description |
---|---|---|
IContentReference | contentItem | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<IResult<IPermissions>> |
Type Parameters
Name | Description |
---|---|
TContent |
GetSessionAsync(CancellationToken)
Gets the current server session information.
Declaration
public Task<IResult<IServerSession>> GetSessionAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IServerSession>> | An awaitable task with the server session result. |
InitializeAsync(CancellationToken)
Performs pre-migration initialization.
Declaration
public Task<IResult> InitializeAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult> | An awaitable task with the initialization result. |
ListConnectionsAsync<TContent>(Guid, CancellationToken)
Declaration
public Task<IResult<ImmutableList<IConnection>>> ListConnectionsAsync<TContent>(Guid contentItemId, CancellationToken cancel) where TContent : IWithConnections
Parameters
Type | Name | Description |
---|---|---|
Guid | contentItemId | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task<IResult<ImmutableList<IConnection>>> |
Type Parameters
Name | Description |
---|---|
TContent |