protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            RecipientDisplayType recipientDisplayType = (RecipientDisplayType)value;

            propertyBag.SetValueWithFixup(InternalSchema.DisplayTypeExInternal, (int)recipientDisplayType);
            propertyBag.SetValueWithFixup(InternalSchema.DisplayType, (int)DisplayTypeExProperty.GetLegacyRecipientDisplayType(recipientDisplayType));
        }
 private static RecipientDisplayType GetRecipientDisplayTypeInNativeForest(RecipientDisplayType recipientDisplayType)
 {
     if (!DisplayTypeExProperty.IsLocalForestRecipient(recipientDisplayType))
     {
         return(DisplayTypeExProperty.GetRecipientDisplayTypeInForeignForest(recipientDisplayType));
     }
     return(DisplayTypeExProperty.GetRecipientDisplayTypeInLocalForest(recipientDisplayType));
 }
Ejemplo n.º 3
0
        private bool?GetIsResourceFromDisplayTypeEx(PropertyBag.BasicPropertyStore propertyBag)
        {
            RecipientDisplayType?recipientDisplayType = new RecipientDisplayType?(propertyBag.GetValueOrDefault <RecipientDisplayType>(InternalSchema.DisplayTypeExInternal));

            if (recipientDisplayType == null)
            {
                return(null);
            }
            return(new bool?(DisplayTypeExProperty.IsResource(recipientDisplayType.Value)));
        }
Ejemplo n.º 4
0
        private bool?GetIsGroupMailboxFromDisplayTypeEx(PropertyBag.BasicPropertyStore propertyBag)
        {
            RecipientDisplayType?valueAsNullable = propertyBag.GetValueAsNullable <RecipientDisplayType>(InternalSchema.DisplayTypeExInternal);

            if (valueAsNullable == null)
            {
                return(null);
            }
            return(new bool?(DisplayTypeExProperty.IsGroupMailbox(valueAsNullable.Value)));
        }
        private bool?GetIsDLFromDisplayType(PropertyBag.BasicPropertyStore propertyBag)
        {
            LegacyRecipientDisplayType?valueAsNullable = propertyBag.GetValueAsNullable <LegacyRecipientDisplayType>(InternalSchema.DisplayType);

            if (valueAsNullable == null)
            {
                return(null);
            }
            return(new bool?(DisplayTypeExProperty.IsDL(valueAsNullable.Value)));
        }
        internal static bool IsGroupMailbox(RecipientDisplayType recipientDisplayType)
        {
            RecipientDisplayType recipientDisplayTypeInNativeForest = DisplayTypeExProperty.GetRecipientDisplayTypeInNativeForest(recipientDisplayType);

            return(recipientDisplayTypeInNativeForest == RecipientDisplayType.GroupMailboxUser);
        }
        internal static bool IsResource(RecipientDisplayType recipientDisplayType)
        {
            RecipientDisplayType recipientDisplayTypeInNativeForest = DisplayTypeExProperty.GetRecipientDisplayTypeInNativeForest(recipientDisplayType);

            return(recipientDisplayTypeInNativeForest == RecipientDisplayType.EquipmentMailbox);
        }
        internal static bool IsRoom(RecipientDisplayType recipientDisplayType)
        {
            RecipientDisplayType recipientDisplayTypeInNativeForest = DisplayTypeExProperty.GetRecipientDisplayTypeInNativeForest(recipientDisplayType);

            return(recipientDisplayTypeInNativeForest == RecipientDisplayType.ConferenceRoomMailbox);
        }
        internal static bool IsMailboxUser(RecipientDisplayType recipientDisplayType)
        {
            RecipientDisplayType recipientDisplayTypeInNativeForest = DisplayTypeExProperty.GetRecipientDisplayTypeInNativeForest(recipientDisplayType);

            return(recipientDisplayTypeInNativeForest == RecipientDisplayType.MailboxUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.RemoteMailUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.ACLableMailboxUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.ACLableRemoteMailUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.ACLableSyncedMailboxUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.ACLableSyncedRemoteMailUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.LinkedUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.SyncedMailboxUser || recipientDisplayTypeInNativeForest == RecipientDisplayType.SyncedRemoteMailUser);
        }
Ejemplo n.º 10
0
        internal static bool IsDL(RecipientDisplayType recipientDisplayType)
        {
            RecipientDisplayType recipientDisplayTypeInNativeForest = DisplayTypeExProperty.GetRecipientDisplayTypeInNativeForest(recipientDisplayType);

            return(recipientDisplayTypeInNativeForest == RecipientDisplayType.DistributionGroup || recipientDisplayTypeInNativeForest == RecipientDisplayType.DynamicDistributionGroup || recipientDisplayTypeInNativeForest == RecipientDisplayType.SecurityDistributionGroup || recipientDisplayTypeInNativeForest == RecipientDisplayType.PrivateDistributionList);
        }
Ejemplo n.º 11
0
        private static LegacyRecipientDisplayType GetLegacyRecipientDisplayType(RecipientDisplayType recipientDisplayType)
        {
            LegacyRecipientDisplayType legacyRecipientDisplayType = (LegacyRecipientDisplayType)(DisplayTypeExProperty.GetRecipientDisplayTypeInLocalForest(recipientDisplayType) & (RecipientDisplayType)255);

            if (EnumValidator.IsValidValue <LegacyRecipientDisplayType>(legacyRecipientDisplayType))
            {
                return(legacyRecipientDisplayType);
            }
            if (legacyRecipientDisplayType != (LegacyRecipientDisplayType)9)
            {
                return(LegacyRecipientDisplayType.MailUser);
            }
            return(LegacyRecipientDisplayType.DistributionList);
        }
Ejemplo n.º 12
0
 private static RecipientDisplayType GetRecipientDisplayTypeInForeignForest(RecipientDisplayType recipientDisplayType)
 {
     return(DisplayTypeExProperty.FixRecipientDisplayType((recipientDisplayType & (RecipientDisplayType)65280) >> 8));
 }
Ejemplo n.º 13
0
 private static RecipientDisplayType GetRecipientDisplayTypeInLocalForest(RecipientDisplayType recipientDisplayType)
 {
     return(DisplayTypeExProperty.FixRecipientDisplayType(recipientDisplayType & (RecipientDisplayType)1073742079));
 }