internal static bool AddMserveEntry(string address, int value)
        {
            RecipientSyncOperation recipientSyncOperation = new RecipientSyncOperation();

            recipientSyncOperation.AddedEntries.Add(address);
            recipientSyncOperation.PartnerId = value;
            MServDirectorySession.SyncToMserv(address, recipientSyncOperation);
            return(recipientSyncOperation.Synchronized);
        }
        private static bool RemoveMserveEntryWithExactValue(string address, int value)
        {
            RecipientSyncOperation recipientSyncOperation = new RecipientSyncOperation();

            recipientSyncOperation.RemovedEntries.Add(address);
            recipientSyncOperation.PartnerId = value;
            MServDirectorySession.SyncToMserv(address, recipientSyncOperation);
            return(recipientSyncOperation.Synchronized);
        }
        internal static int ReadMservEntry(string address)
        {
            List <RecipientSyncOperation> list = MServDirectorySession.SyncToMserv(address, new RecipientSyncOperation
            {
                ReadEntries =
                {
                    address
                }
            });

            if (list.Count <= 0)
            {
                return(-1);
            }
            return(list[0].PartnerId);
        }