Пример #1
0
 /// <inheritdoc/>
 public override string ToString()
 {
     return(string.Format(
                "Delete from '{0}' where ({1}){2}",
                SourceTablePath,
                string.Join(" and ",
                            Identities.Select(pair => pair.ToString()).ToArray()),
                PostCopy ? " (after data copying)" : string.Empty));
 }
Пример #2
0
 /// <inheritdoc/>
 public override string ToString()
 {
     return(string.Format(
                "Update '{0}' set ({1}) where ({2})",
                SourceTablePath,
                string.Join(", ", UpdateParameter.Select(pair =>
                                                         string.Format("{0}={1}", pair.First, pair.Second ?? "Default"))
                            .ToArray()),
                string.Join(" and ", Identities.Select(pair => pair.ToString()).ToArray())));
 }
Пример #3
0
 /// <inheritdoc/>
 public override string ToString()
 {
     return(string.Format(
                "Copy from '{0}' to '{1}' where ({2})",
                string.Join(", ", CopiedColumns.Select(pair => pair.First)
                            .ToArray()),
                string.Join(", ", CopiedColumns.Select(pair => pair.Second)
                            .ToArray()),
                string.Join(" and ", Identities.Select(pair => pair.ToString())
                            .ToArray())));
 }
Пример #4
0
        private async Task RefreshIdentities()
        {
            Trace($"Refresh identities");

            async Task RefreshIdentity(Identity identity)
            {
                var info = await Connection.GetIdentityInfo(identity.AccountID);

                identity.Refresh(info);
            }

            var tasks = Identities.Select(i => RefreshIdentity(i));

            await Task.WhenAll(tasks);
        }
Пример #5
0
 public override string ToString()
 {
     return($"Instance[Identities=\"{String.Join(", ", Identities.Select(s => s.ToString()))}\"]");
 }
 public ClaimsPrincipal ToClaimPrincipal()
 {
     return(new ClaimsPrincipal(Identities.Select(identity => new ClaimsIdentity(identity.Claims.Select(claim => new Claim(claim.Type, claim.Value)), identity.AuthenticationType))));
 }