internal static void AddLinks(List <ADDirSyncLink> result, MultiValuedProperty <ADObjectId> links, LinkState state, ADPropertyDefinition propertyDefinition) { if (links != null) { foreach (ADObjectId link in links) { result.Add(ADDirSyncHelper.CreateSyncLinks(link, state, propertyDefinition)); } } }
internal static IDictionary <ADPropertyDefinition, object> GetChangedProperties(ICollection properties, PropertyBag propertyBag) { Dictionary <ADPropertyDefinition, object> dictionary = new Dictionary <ADPropertyDefinition, object>(properties.Count); foreach (object obj in properties) { ADPropertyDefinition adpropertyDefinition = (ADPropertyDefinition)obj; if (ADDirSyncHelper.ContainsProperty(propertyBag, adpropertyDefinition)) { dictionary[adpropertyDefinition] = propertyBag[adpropertyDefinition]; } } return(dictionary); }
internal static MultiValuedPropertyBase GetAddedRemovedLinks(ADPropertyDefinition propertyDefinition, SearchResultAttributeCollection attributeCollection, List <ADPropertyDefinition> rangedProperties, List <ValidationError> errors) { MultiValuedProperty <ADObjectId> links = ADDirSyncHelper.GetLinks(propertyDefinition, false, attributeCollection, rangedProperties, errors); MultiValuedProperty <ADObjectId> links2 = ADDirSyncHelper.GetLinks(propertyDefinition, true, attributeCollection, rangedProperties, errors); if (links != null || links2 != null) { List <ADDirSyncLink> list = new List <ADDirSyncLink>(); ADDirSyncHelper.AddLinks(list, links, LinkState.Added, propertyDefinition); ADDirSyncHelper.AddLinks(list, links2, LinkState.Removed, propertyDefinition); return(ADValueConvertor.CreateGenericMultiValuedProperty(propertyDefinition, true, list, ADDirSyncHelper.EmptyList, null)); } return(null); }
private bool Contains(ProviderPropertyDefinition property) { return(ADDirSyncHelper.ContainsProperty(this.propertyBag, property)); }
internal IDictionary <ADPropertyDefinition, object> GetChangedProperties(ICollection properties) { return(ADDirSyncHelper.GetChangedProperties(properties, this.propertyBag)); }