public static void PerformMservModification(ADPropertyBag mservPropertyBag)
 {
     using (MservRecipientSession mservRecipientSession = new MservRecipientSession(false))
     {
         ADRawEntry instanceToSave = new ADRawEntry(mservPropertyBag);
         mservRecipientSession.Save(instanceToSave);
     }
 }
        public static ADRawEntry PerformMservLookupByPuid(ulong puid, bool isReadOnly, List <MServPropertyDefinition> properties)
        {
            new ADPropertyBag();
            ADRawEntry result;

            using (MservRecipientSession mservRecipientSession = new MservRecipientSession(isReadOnly))
            {
                result = mservRecipientSession.FindADRawEntryByPuid(puid, properties);
            }
            return(result);
        }
        public static ADRawEntry PerformMservLookupByMemberName(SmtpAddress memberName, bool isReadOnly, List <MServPropertyDefinition> properties)
        {
            if (!properties.Contains(MServRecipientSchema.NetID))
            {
                properties.Add(MServRecipientSchema.NetID);
            }
            new ADPropertyBag();
            ADRawEntry result;

            using (MservRecipientSession mservRecipientSession = new MservRecipientSession(isReadOnly))
            {
                result = mservRecipientSession.FindADRawEntryByEmailAddress(memberName.ToString(), properties);
            }
            return(result);
        }