Пример #1
0
        public IEnumerableAsync <TAccount> StorageFindAccountsFromAccountLinks <TAccount>(string accountKey,
                                                                                          Expression <Func <TAccount, AccountLinks> > accountLinksProperty)
            where TAccount : IAccount, IReferenceable
        {
            var accountLinks = new AccountLinks
            {
                accountLinks = new AccountLink[]
                {
                    new AccountLink
                    {
                        externalAccountKey = accountKey,
                        method             = this.authenticationId,
                    }
                }
            };

            var thisMethodId = this.id;

            return(accountLinks
                   .StorageGetBy <AccountLinks, TAccount>(accountLinksProperty)
                   .Where(account => account.AccountLinks.accountLinks
                          .Contains(al => al.method.id == thisMethodId)));
        }
Пример #2
0
 public static AccountLinks AppendCredentials(this AccountLinks accountLinks,
                                              Method authMethod, string accountKey) =>
 accountLinks.AddOrUpdateCredentials(authMethod.authenticationId, accountKey);