Ejemplo n.º 1
0
 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));
         }
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 private bool Contains(ProviderPropertyDefinition property)
 {
     return(ADDirSyncHelper.ContainsProperty(this.propertyBag, property));
 }
Ejemplo n.º 5
0
 internal IDictionary <ADPropertyDefinition, object> GetChangedProperties(ICollection properties)
 {
     return(ADDirSyncHelper.GetChangedProperties(properties, this.propertyBag));
 }