public static FilterProviderBase GetFilterProvider(string tableName, string filterMemberName, StatementContext modify) { FilterProviderBase provider = Providers.Cast <FilterProviderBase>().FirstOrDefault(probase => (probase.ObjectType == null || probase.ObjectType.Name == tableName) && probase.FilterMemberName == filterMemberName && (probase.StatementContext == modify || probase.StatementContext == StatementContext.Both)); if (provider != null && HasFilterValue(provider) && !provider.UseFilterValueWhenNull) { return(null); } return(provider); }
/// <summary> /// Creates a collection of <see cref="IOrganizationServiceEventProvider"/> object. /// </summary> /// <returns></returns> public IEnumerable <IOrganizationServiceEventProvider> CreateEventProviders() { return(Providers.Cast <OrganizationServiceEventProviderElement>().Select(p => p.CreateEventProvider()).ToList()); }