Пример #1
0
 public FailedMSOSyncObjectPresentationObject(FailedMSOSyncObject divergence) : base(new SimpleProviderPropertyBag())
 {
     if (divergence == null)
     {
         throw new ArgumentNullException("divergence");
     }
     this.propertyBag = divergence.propertyBag;
     this.divergence  = divergence;
 }
Пример #2
0
        private static QueryFilter ExternalDirectoryObjectIdFilterBuilder(SinglePropertyFilter filter, ADPropertyDefinition externalDirectoryId)
        {
            if (!(filter is ComparisonFilter) && !(filter is TextFilter))
            {
                throw new ADFilterException(DirectoryStrings.ExceptionUnsupportedFilterForPropertyMultiple(filter.Property.Name, filter.GetType(), typeof(ComparisonFilter), typeof(TextFilter)));
            }
            ComparisonFilter comparisonFilter = filter as ComparisonFilter;
            QueryFilter      queryFilter;

            if (comparisonFilter != null)
            {
                if (comparisonFilter.ComparisonOperator != ComparisonOperator.Equal && ComparisonOperator.NotEqual != comparisonFilter.ComparisonOperator)
                {
                    throw new ADFilterException(DirectoryStrings.ExceptionUnsupportedOperatorForProperty(comparisonFilter.Property.Name, comparisonFilter.ComparisonOperator.ToString()));
                }
                queryFilter = new OrFilter(new QueryFilter[]
                {
                    new ComparisonFilter(ComparisonOperator.Equal, externalDirectoryId, comparisonFilter.PropertyValue),
                    new ComparisonFilter(ComparisonOperator.Equal, externalDirectoryId, FailedMSOSyncObject.GetMangledId(comparisonFilter.PropertyValue))
                });
                if (comparisonFilter.ComparisonOperator == ComparisonOperator.NotEqual)
                {
                    queryFilter = new NotFilter(queryFilter);
                }
            }
            else
            {
                TextFilter textFilter = (TextFilter)filter;
                queryFilter = new OrFilter(new QueryFilter[]
                {
                    new TextFilter(externalDirectoryId, textFilter.Text, textFilter.MatchOptions, textFilter.MatchFlags),
                    new TextFilter(externalDirectoryId, FailedMSOSyncObject.GetMangledId(textFilter.Text), textFilter.MatchOptions, textFilter.MatchFlags)
                });
            }
            return(queryFilter);
        }
Пример #3
0
 internal static QueryFilter ExternalDirectoryOrganizationIdFilterBuilder(SinglePropertyFilter filter)
 {
     return(FailedMSOSyncObject.ExternalDirectoryObjectIdFilterBuilder(filter, FailedMSOSyncObjectSchema.RawContextId));
 }
Пример #4
0
 internal static void ExternalDirectoryOrganizationIdSetter(object value, IPropertyBag bag)
 {
     FailedMSOSyncObject.ExternalDirectoryIdSetter(value, bag, FailedMSOSyncObjectSchema.RawContextId);
 }
Пример #5
0
 internal static object ExternalDirectoryOrganizationIdGetter(IPropertyBag bag)
 {
     return(FailedMSOSyncObject.ExternalDirectoryIdGetter(bag, FailedMSOSyncObjectSchema.RawContextId));
 }
Пример #6
0
 internal static string GetObjectName(SyncObjectId syncObjectId)
 {
     return(string.Format("{0}{1}", FailedMSOSyncObject.GetCompactGuidString(syncObjectId.ContextId), FailedMSOSyncObject.GetCompactGuidString(syncObjectId.ObjectId)));
 }