internal override Asn1Filter GetAsn() { var filter = new Asn1Filter[Filter.Count]; for (int i = 0; i < Filter.Count; i++) { filter[i] = Filter[i].GetAsn(); } return(new Asn1Filter { Or = filter }); }
internal static LdapFilter Create(Asn1Filter filter) { if (filter.And != null) { return(new LdapAndFilter(filter.And)); } else if (filter.Or != null) { return(new LdapOrFilter(filter.Or)); } else if (filter.Not != null) { return(new LdapNotFilter(filter.Not)); } else if (filter.EqualityMatch != null) { return(new LdapEqualityFilter(filter.EqualityMatch)); } else if (filter.Substrings != null) { return(new LdapSubstringFilter(filter.Substrings)); } else if (filter.GreaterOrEqual != null) { return(new LdapGreaterOrEqualFilter(filter.GreaterOrEqual)); } else if (filter.LessOrEqual != null) { return(new LdapLessOrEqualFilter(filter.LessOrEqual)); } else if (filter.Present.HasValue) { return(new LdapPresentFilter(filter.Present.Value)); } else if (filter.ApproxMatch != null) { return(new LdapApproxMatchFilter(filter.ApproxMatch)); } else if (filter.ExtensibleMatch != null) { return(new LdapExtensibleMatchFilter(filter.ExtensibleMatch)); } else { throw new NotSupportedException("unsupported filter"); } }
internal LdapNotFilter(Asn1Filter filter) { Filter = Create(filter); }