public SharingPolicyDomain(string domain, SharingPolicyAction actions)
 {
     domain = (StringComparer.OrdinalIgnoreCase.Equals(domain, "Anonymous") ? "Anonymous" : domain);
     SharingPolicyDomain.Validate(domain, actions);
     this.Domain  = domain;
     this.Actions = actions;
 }
        public override bool Equals(object otherObject)
        {
            SharingPolicyDomain sharingPolicyDomain = otherObject as SharingPolicyDomain;

            return(sharingPolicyDomain != null && this.Actions == sharingPolicyDomain.Actions && StringComparer.OrdinalIgnoreCase.Equals(this.Domain, sharingPolicyDomain.Domain));
        }