C# 클래스 Amazon.CognitoSync.SyncManager.CognitoSyncManager

파일 보기 프로젝트 열기: aws/aws-sdk-net 1 사용 예제들

공개 메소드들

메소드 설명
BeginRefreshDatasetMetadata ( AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the RefreshDatasetMetadata operation. Refreshes dataset metadata. Dataset metadata is pulled from remote storage and stored in local storage. Their record data isn't pulled down until you sync each dataset.

CognitoSyncManager ( CognitoAWSCredentials cognitoCredentials ) : System

Creates an instance of CognitoSyncManager using Cognito Credentials, the region is picked up from the config if it available CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials)

CognitoSyncManager ( CognitoAWSCredentials cognitoCredentials, AmazonCognitoSyncConfig config ) : System

Creates an instance of CognitoSyncManager using cognito credentials and a configuration object CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials,new AmazonCognitoSyncConfig { RegionEndpoint = RegionEndpoint.USEAST1})

CognitoSyncManager ( CognitoAWSCredentials cognitoCredentials, RegionEndpoint endpoint ) : System

Creates an instance of CognitoSyncManager using cognito credentials and a specific region CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials, RegionEndpoint.USEAST1)

Dispose ( ) : void

Releases the resources consumed by this object

EndRefreshDatasetMetadata ( IAsyncResult asyncResult ) : List

Finishes the asynchronous execution of the RefreshDatasetMetadata operation.

ListDatasets ( ) : List

Retrieves a list of datasets from local storage. It may not reflect the latest dataset on the remote storage until the RefreshDatasetMetadata operation is performed.

OpenOrCreateDataset ( string datasetName ) : Dataset

Opens or creates a dataset. If the dataset doesn't exist, an empty one with the given name will be created. Otherwise, the dataset is loaded from local storage. If a dataset is marked as deleted but hasn't been deleted on remote via the RefreshDatasetMetadata operation, it will throw System.InvalidOperationException. Dataset dataset = cognitoSyncManager.OpenOrCreateDataset("myDatasetName");

RefreshDatasetMetadataAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Refreshes dataset metadata. Dataset metadata is pulled from remote storage and stored in local storage. Their record data isn't pulled down until you sync each dataset.

RefreshDatasetMetadataAsync ( AmazonCognitoSyncCallback callback, AsyncOptions options = null ) : void

Refreshes dataset metadata. Dataset metadata is pulled from remote storage and stored in local storage. Their record data isn't pulled down until you sync each dataset.

WipeData ( ) : void

Wipes all user data cached locally, including identity id, session credentials, dataset metadata, and all records. Any data that hasn't been synced will be lost. This method is usually used when customer logs out.

WipeData ( bool wipeCredentialsAndID ) : void

Wipes all user data cached locally, including dataset metadata, and all records, and optionally identity id and session credentials. Any data that hasn't been synced will be lost. This method is usually used when customer logs out. Wipe Credentials and IdentityId.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the resources consumed by this object if disposing is true.

IdentityChanged ( object sender, EventArgs e ) : void

This is triggered when an Identity Change event occurs. The dataset are then remapped to the new identity id. This may happend for example when a user is working with unauthenticated id and later decides to authenticate himself with a public login provider

비공개 메소드들

메소드 설명
ValidateParameters ( ) : void

메소드 상세

BeginRefreshDatasetMetadata() 공개 메소드

Initiates the asynchronous execution of the RefreshDatasetMetadata operation. Refreshes dataset metadata. Dataset metadata is pulled from remote storage and stored in local storage. Their record data isn't pulled down until you sync each dataset.
public BeginRefreshDatasetMetadata ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
리턴 IAsyncResult

CognitoSyncManager() 공개 메소드

Creates an instance of CognitoSyncManager using Cognito Credentials, the region is picked up from the config if it available CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials)
public CognitoSyncManager ( CognitoAWSCredentials cognitoCredentials ) : System
cognitoCredentials CognitoAWSCredentials
리턴 System

CognitoSyncManager() 공개 메소드

Creates an instance of CognitoSyncManager using cognito credentials and a configuration object CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials,new AmazonCognitoSyncConfig { RegionEndpoint = RegionEndpoint.USEAST1})
public CognitoSyncManager ( CognitoAWSCredentials cognitoCredentials, AmazonCognitoSyncConfig config ) : System
cognitoCredentials CognitoAWSCredentials
config AmazonCognitoSyncConfig
리턴 System

CognitoSyncManager() 공개 메소드

Creates an instance of CognitoSyncManager using cognito credentials and a specific region CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials, RegionEndpoint.USEAST1)
public CognitoSyncManager ( CognitoAWSCredentials cognitoCredentials, RegionEndpoint endpoint ) : System
cognitoCredentials CognitoAWSCredentials
endpoint RegionEndpoint
리턴 System

Dispose() 공개 메소드

Releases the resources consumed by this object
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases the resources consumed by this object if disposing is true.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

EndRefreshDatasetMetadata() 공개 메소드

Finishes the asynchronous execution of the RefreshDatasetMetadata operation.
public EndRefreshDatasetMetadata ( IAsyncResult asyncResult ) : List
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginRefreshDatasetMetadata.
리턴 List

IdentityChanged() 보호된 메소드

This is triggered when an Identity Change event occurs. The dataset are then remapped to the new identity id. This may happend for example when a user is working with unauthenticated id and later decides to authenticate himself with a public login provider
protected IdentityChanged ( object sender, EventArgs e ) : void
sender object The object which triggered this methos
e System.EventArgs Event Arguments
리턴 void

ListDatasets() 공개 메소드

Retrieves a list of datasets from local storage. It may not reflect the latest dataset on the remote storage until the RefreshDatasetMetadata operation is performed.
public ListDatasets ( ) : List
리턴 List

OpenOrCreateDataset() 공개 메소드

Opens or creates a dataset. If the dataset doesn't exist, an empty one with the given name will be created. Otherwise, the dataset is loaded from local storage. If a dataset is marked as deleted but hasn't been deleted on remote via the RefreshDatasetMetadata operation, it will throw System.InvalidOperationException. Dataset dataset = cognitoSyncManager.OpenOrCreateDataset("myDatasetName");
public OpenOrCreateDataset ( string datasetName ) : Dataset
datasetName string DatasetName, must be [a-zA-Z0=9_.:-]+
리턴 Dataset

RefreshDatasetMetadataAsync() 공개 메소드

Refreshes dataset metadata. Dataset metadata is pulled from remote storage and stored in local storage. Their record data isn't pulled down until you sync each dataset.
Thrown when fail to fresh dataset metadata
public RefreshDatasetMetadataAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task>
cancellationToken System.Threading.CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
리턴 Task>

RefreshDatasetMetadataAsync() 공개 메소드

Refreshes dataset metadata. Dataset metadata is pulled from remote storage and stored in local storage. Their record data isn't pulled down until you sync each dataset.
Thrown when fail to fresh dataset metadata
public RefreshDatasetMetadataAsync ( AmazonCognitoSyncCallback callback, AsyncOptions options = null ) : void
callback AmazonCognitoSyncCallback Callback once the refresh is complete
options AsyncOptions Options for asynchronous execution
리턴 void

WipeData() 공개 메소드

Wipes all user data cached locally, including identity id, session credentials, dataset metadata, and all records. Any data that hasn't been synced will be lost. This method is usually used when customer logs out.
public WipeData ( ) : void
리턴 void

WipeData() 공개 메소드

Wipes all user data cached locally, including dataset metadata, and all records, and optionally identity id and session credentials. Any data that hasn't been synced will be lost. This method is usually used when customer logs out. Wipe Credentials and IdentityId.
public WipeData ( bool wipeCredentialsAndID ) : void
wipeCredentialsAndID bool
리턴 void