Example #1
0
        internal override void ForEachProperty(IPropertyProcessor processor)
        {
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncGroupSchema.Description, ref this.descriptionField);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.CloudLegacyExchangeDN, ref this.cloudLegacyExchangeDNField);
            processor.Process <DirectoryPropertyInt32Single>(SyncRecipientSchema.CloudMsExchRecipientDisplayType, ref this.cloudMSExchRecipientDisplayTypeField);
            processor.Process <DirectoryPropertyStringSingleLength1To256>(SyncRecipientSchema.DisplayName, ref this.displayNameField);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute1, ref this.extensionAttribute1Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute10, ref this.extensionAttribute10Field);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.CustomAttribute11, ref this.extensionAttribute11Field);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.CustomAttribute12, ref this.extensionAttribute12Field);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.CustomAttribute13, ref this.extensionAttribute13Field);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.CustomAttribute14, ref this.extensionAttribute14Field);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.CustomAttribute15, ref this.extensionAttribute15Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute2, ref this.extensionAttribute2Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute3, ref this.extensionAttribute3Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute4, ref this.extensionAttribute4Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute5, ref this.extensionAttribute5Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute6, ref this.extensionAttribute6Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute7, ref this.extensionAttribute7Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute8, ref this.extensionAttribute8Field);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.CustomAttribute9, ref this.extensionAttribute9Field);
            processor.Process <DirectoryPropertyStringLength1To2048>(SyncRecipientSchema.ExtensionCustomAttribute1, ref this.mSExchExtensionCustomAttribute1Field);
            processor.Process <DirectoryPropertyStringLength1To2048>(SyncRecipientSchema.ExtensionCustomAttribute2, ref this.mSExchExtensionCustomAttribute2Field);
            processor.Process <DirectoryPropertyStringLength1To2048>(SyncRecipientSchema.ExtensionCustomAttribute3, ref this.mSExchExtensionCustomAttribute3Field);
            processor.Process <DirectoryPropertyStringLength1To2048>(SyncRecipientSchema.ExtensionCustomAttribute4, ref this.mSExchExtensionCustomAttribute4Field);
            processor.Process <DirectoryPropertyStringLength1To2048>(SyncRecipientSchema.ExtensionCustomAttribute5, ref this.mSExchExtensionCustomAttribute5Field);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.MailEnabled, ref this.mailEnabledField);
            processor.Process <DirectoryPropertyStringSingleMailNickname>(SyncRecipientSchema.Alias, ref this.mailNicknameField);
            processor.Process <DirectoryPropertyInt32Single>(SyncRecipientSchema.SeniorityIndex, ref this.mSDSHABSeniorityIndexField);
            processor.Process <DirectoryPropertyStringSingleLength1To256>(SyncRecipientSchema.PhoneticDisplayName, ref this.mSDSPhoneticDisplayNameField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncRecipientSchema.ModerationEnabled, ref this.mSExchEnableModerationField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncRecipientSchema.HiddenFromAddressListsEnabled, ref this.mSExchHideFromAddressListsField);
            processor.Process <DirectoryPropertyDateTimeSingle>(SyncRecipientSchema.LitigationHoldDate, ref this.mSExchLitigationHoldDateField);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.LitigationHoldOwner, ref this.mSExchLitigationHoldOwnerField);
            processor.Process <DirectoryPropertyInt32Single>(SyncRecipientSchema.ModerationFlags, ref this.mSExchModerationFlagsField);
            processor.Process <DirectoryPropertyInt64Single>(SyncGroupSchema.RecipientTypeDetailsValue, ref this.mSExchRecipientTypeDetailsField);
            processor.Process <DirectoryPropertyStringSingleLength1To1024>(SyncRecipientSchema.RetentionComment, ref this.mSExchRetentionCommentField);
            processor.Process <DirectoryPropertyStringSingleLength1To2048>(SyncRecipientSchema.RetentionUrl, ref this.mSExchRetentionUrlField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncRecipientSchema.RequireAllSendersAreAuthenticated, ref this.mSExchRequireAuthToSendToField);
            processor.Process <DirectoryPropertyStringLength2To500>(SyncRecipientSchema.MailTipTranslations, ref this.mSExchSenderHintTranslationsField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.IsHierarchicalGroup, ref this.mSOrgIsOrganizationalField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.SendOofMessageToOriginatorEnabled, ref this.oofReplyToOriginatorField);
            processor.Process <DirectoryPropertyProxyAddresses>(SyncRecipientSchema.EmailAddresses, ref this.proxyAddressesField);
            processor.Process <DirectoryPropertyProxyAddresses>(SyncRecipientSchema.SmtpAndX500Addresses, ref this.proxyAddressesField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.ReportToOriginatorEnabled, ref this.reportToOriginatorField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.ReportToManagerEnabled, ref this.reportToOwnerField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.SecurityEnabled, ref this.securityEnabledField);
            processor.Process <DirectoryPropertyStringSingleLength1To64>(SyncRecipientSchema.Cn, ref this.shadowCommonNameField);
            processor.Process <DirectoryPropertyStringSingleLength1To256>(SyncRecipientSchema.OnPremisesObjectId, ref this.sourceAnchorField);
            processor.Process <DirectoryPropertyXmlValidationError>(SyncRecipientSchema.ValidationError, ref this.validationErrorField);
            processor.Process <DirectoryPropertyStringSingleLength1To40>(SyncGroupSchema.WellKnownObject, ref this.wellKnownObjectField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncRecipientSchema.IsDirSynced, ref this.dirSyncEnabledField);
            DirectoryPropertyAttributeSet directoryPropertyAttributeSet = (DirectoryPropertyAttributeSet)DirectoryObject.GetDirectoryProperty(this.singleAuthorityMetadataField);

            processor.Process <DirectoryPropertyAttributeSet>(SyncRecipientSchema.DirSyncAuthorityMetadata, ref directoryPropertyAttributeSet);
            processor.Process <DirectoryPropertyStringLength1To1024>(SyncGroupSchema.SharePointResources, ref this.sharepointResourcesField);
            processor.Process <DirectoryPropertyReferenceUserAndServicePrincipalSingle>(SyncGroupSchema.Creator, ref this.createdOnBehalfOfField);
            processor.Process <DirectoryPropertyBooleanSingle>(SyncGroupSchema.IsPublic, ref this.isPublicField);
        }
Example #2
0
        internal static DirectoryProperty GetDirectoryProperty(object nonDirectoryProperty)
        {
            if (nonDirectoryProperty == null)
            {
                return(null);
            }
            if (nonDirectoryProperty is AttributeSet[])
            {
                DirectoryPropertyAttributeSet directoryPropertyAttributeSet = new DirectoryPropertyAttributeSet();
                directoryPropertyAttributeSet.SetValues((AttributeSet[])nonDirectoryProperty);
                return(directoryPropertyAttributeSet);
            }
            string message = string.Format(CultureInfo.CurrentCulture, "The value '{0}' is invalid.", new object[]
            {
                nonDirectoryProperty.GetType()
            });

            throw new ArgumentException(message, "nonDirectoryProperty");
        }