コード例 #1
0
        protected override bool ProcessInternal(PropertyBag propertyBag)
        {
            if (!RecipientTypeFilter.HasObjectId(propertyBag))
            {
                ExTraceGlobals.BackSyncTracer.TraceDebug((long)SyncConfiguration.TraceId, "RecipientTypeFilter:: - Skipping object {0}. No object id set on object.", new object[]
                {
                    propertyBag[ADObjectSchema.Id]
                });
                this.reporter.ReportExcludedObject(propertyBag, DirectoryObjectErrorCode.ObjectOutOfScope, ProcessingStage.RecipientTypeFilter);
                return(false);
            }
            if (ProcessorHelper.IsDeletedObject(propertyBag))
            {
                return(!ProvisioningTasksConfigImpl.UseBecAPIsforLiveId || !ProcessorHelper.IsUserObject(propertyBag));
            }
            if (RecipientTypeFilter.IsObjectExcluded(propertyBag))
            {
                ExTraceGlobals.BackSyncTracer.TraceDebug((long)SyncConfiguration.TraceId, "RecipientTypeFilter:: - Skipping object {0}. It's marked as excluded form backsync.", new object[]
                {
                    propertyBag[ADObjectSchema.Id]
                });
                this.reporter.ReportExcludedObject(propertyBag, DirectoryObjectErrorCode.UnspecifiedError, ProcessingStage.RecipientTypeFilter);
                return(false);
            }
            bool flag;

            if (!ProcessorHelper.IsObjectOrganizationUnit(propertyBag))
            {
                RecipientTypeDetails recipientTypeDetails = (RecipientTypeDetails)propertyBag[ADRecipientSchema.RecipientTypeDetails];
                flag = this.IsAcceptedRecipientType(recipientTypeDetails);
                if (!flag)
                {
                    ExTraceGlobals.BackSyncTracer.TraceDebug <object, RecipientTypeDetails>((long)SyncConfiguration.TraceId, "RecipientTypeFilter:: - Skipping object {0}. Recipient type {1} is not included in backsync.", propertyBag[SyncObjectSchema.ObjectId], recipientTypeDetails);
                    this.reporter.ReportExcludedObject(propertyBag, DirectoryObjectErrorCode.ObjectOutOfScope, ProcessingStage.RecipientTypeFilter);
                }
            }
            else
            {
                flag = true;
            }
            return(flag);
        }
コード例 #2
0
 internal static bool HasObjectId(PropertyBag propertyBag)
 {
     return(propertyBag.Contains(SyncObjectSchema.ObjectId) && !string.IsNullOrEmpty((string)propertyBag[SyncObjectSchema.ObjectId]) && RecipientTypeFilter.IsValidGuid((string)propertyBag[SyncObjectSchema.ObjectId]));
 }