Beispiel #1
0
        public HostWithCredentials(CredentialDomain domain, int index)
            : base(domain.Hosts[index])
        {
            Guid id = domain.Hosts[index].ID;

            domain.Normalize();
            this.Credentials = domain.Credentials.Where(c => c.Hosts.Contains(id)).Select(a => new CredentialData(a)).ToArray();
        }
        public CredentialWithHosts(CredentialDomain domain, int index)
            : base(domain.Credentials[index])
        {
            List <Guid> paths = domain.Credentials[index].Paths;

            domain.Normalize();
            this.Hosts = domain.Credentials[index].Hosts.SelectMany(g => domain.Hosts.Where(h => h.ID.Equals(g))).Select(a => new ResourceAuthorityInfo(a, paths)).ToArray();
        }
 public CredentialDomainInfo(CredentialDomain source)
 {
     if (source == null)
     {
         return;
     }
     source.Normalize();
     this.ID                = source.__IDString;
     this.Active            = source.Active;
     this.Order             = source.Order;
     this.ResourceAuthority = source.Hosts.Select(h => new ResourceAuthorityInfo(h)).ToArray();
     this.Credentials       = source.Credentials.ToArray();
 }