Пример #1
0
        private static ADPersonToContactConverter[] GetConverters(ICollection <PropertyDefinition> personProperties, IEnumerable <PropertyDefinition> additionalContactProperties)
        {
            new List <ADPersonToContactConverter>(personProperties.Count);
            HashSet <PropertyDefinition> hashSet = new HashSet <PropertyDefinition>();

            foreach (PropertyDefinition propertyDefinition in personProperties)
            {
                ApplicationAggregatedProperty applicationAggregatedProperty = propertyDefinition as ApplicationAggregatedProperty;
                if (applicationAggregatedProperty != null)
                {
                    foreach (PropertyDependency propertyDependency in applicationAggregatedProperty.Dependencies)
                    {
                        hashSet.Add(propertyDependency.Property);
                    }
                }
            }
            if (additionalContactProperties != null)
            {
                foreach (PropertyDefinition item in additionalContactProperties)
                {
                    hashSet.Add(item);
                }
            }
            return(ADPersonToContactConverterSet.GetConverters(hashSet));
        }
Пример #2
0
 private static ADPersonToContactConverterSet Create(params ADPropertyDefinition[] additionalADProperties)
 {
     PropertyDefinition[] array = new PropertyDefinition[PersonSchema.Instance.AllProperties.Count];
     PersonSchema.Instance.AllProperties.CopyTo(array, 0);
     ADPersonToContactConverter[] array2       = ADPersonToContactConverterSet.GetConverters(array, null);
     ADPropertyDefinition[]       adproperties = ADPersonToContactConverterSet.GetADProperties(array2, additionalADProperties);
     return(new ADPersonToContactConverterSet(array2, array, adproperties));
 }
Пример #3
0
 public static ADPersonToContactConverterSet FromContactProperties(PropertyDefinition[] personProperties, HashSet <PropertyDefinition> contactProperties)
 {
     ADPersonToContactConverter[] array        = ADPersonToContactConverterSet.GetConverters(contactProperties);
     ADPropertyDefinition[]       adproperties = ADPersonToContactConverterSet.GetADProperties(array, Array <ADPropertyDefinition> .Empty);
     return(new ADPersonToContactConverterSet(array, personProperties, adproperties));
 }
Пример #4
0
 public static ADPersonToContactConverterSet FromPersonProperties(PropertyDefinition[] personProperties, IEnumerable <PropertyDefinition> additionalContactProperties)
 {
     ADPersonToContactConverter[] array        = ADPersonToContactConverterSet.GetConverters(personProperties, additionalContactProperties);
     ADPropertyDefinition[]       adproperties = ADPersonToContactConverterSet.GetADProperties(array, Array <ADPropertyDefinition> .Empty);
     return(new ADPersonToContactConverterSet(array, personProperties, adproperties));
 }