Task<IAccount> IAccountCreationActions.CreateAccountAsync(IAccount account, IAccountCreationOptions creationOptions, CancellationToken cancellationToken) => AccountCreationActionsShared.CreateAccountAsync(this.GetInternalAsyncDataStore(), this.Accounts.Href, account, creationOptions, cancellationToken);
Task <IAccount> IAccountCreationActions.CreateAccountAsync(IAccount account, IAccountCreationOptions creationOptions, CancellationToken cancellationToken) => AccountCreationActionsShared.CreateAccountAsync(this.GetInternalAsyncDataStore(), this.Accounts.Href, account, creationOptions, cancellationToken);
IAccount IAccountCreationActionsSync.CreateAccount(IAccount account, IAccountCreationOptions creationOptions) => AccountCreationActionsShared.CreateAccount(this.GetInternalSyncDataStore(), this.Accounts.Href, account, creationOptions);
/// <summary> /// Synchronously creates a new <see cref="IAccount">Account</see> that may login to this application. /// </summary> /// <param name="source">The source object.</param> /// <param name="account">The account to create/persist.</param> /// <param name="creationOptions">An <see cref="IAccountCreationOptions"/> instance to use when sending the request.</param> /// <returns>The persisted account.</returns> /// <exception cref="Error.ResourceException">The <see cref="Application.IApplication">Application</see> does not have a dedicated /// <see cref="AccountStore.IAccountStore"/> or if the designated <see cref="AccountStore.IAccountStore"/> /// does not allow new accounts to be created.</exception> public static IAccount CreateAccount(this IAccountCreationActions source, IAccount account, IAccountCreationOptions creationOptions) => (source as IAccountCreationActionsSync).CreateAccount(account, creationOptions);
public static IAccount CreateAccount(IInternalSyncDataStore dataStoreSync, string accountsHref, IAccount account, IAccountCreationOptions creationOptions) => dataStoreSync.Create(accountsHref, account, creationOptions);
public static Task <IAccount> CreateAccountAsync(IInternalAsyncDataStore dataStore, string accountsHref, IAccount account, IAccountCreationOptions creationOptions, CancellationToken cancellationToken) => dataStore.CreateAsync(accountsHref, account, creationOptions, cancellationToken);
public static Task<IAccount> CreateAccountAsync(IInternalAsyncDataStore dataStore, string accountsHref, IAccount account, IAccountCreationOptions creationOptions, CancellationToken cancellationToken) => dataStore.CreateAsync(accountsHref, account, creationOptions, cancellationToken);