示例#1
0
        private static int GetAddressListEphemeralId(NspiRpcClientConnection nspiRpcClientConnection, Guid addressListObjectGuid)
        {
            string text = LegacyDN.FormatLegacyDnFromGuid(Guid.Empty, addressListObjectGuid);

            int[] array;
            int   num = nspiRpcClientConnection.RpcClient.DNToEph(new string[]
            {
                text
            }, out array);

            if (num != 0)
            {
                throw new NspiFailureException(num);
            }
            return(array[0]);
        }
示例#2
0
 private NspiPrincipal(ADUser adUser)
 {
     this.LegacyDistinguishedName = adUser.LegacyExchangeDN;
     if (string.IsNullOrEmpty(this.LegacyDistinguishedName))
     {
         this.LegacyDistinguishedName = LegacyDN.FormatLegacyDnFromGuid(Guid.Empty, adUser.Guid);
     }
     this.AddressBookPolicy   = adUser.AddressBookPolicy;
     this.OrganizationId      = adUser.OrganizationId;
     this.DirectorySearchRoot = adUser.QueryBaseDN;
     this.PrimarySmtpAddress  = adUser.PrimarySmtpAddress;
     this.ExchangeGuid        = adUser.ExchangeGuid;
     this.MAPIEnabled         = adUser.MAPIEnabled;
     this.Database            = adUser.Database;
     this.ExchangeVersion     = adUser.ExchangeVersion;
     if (adUser.Languages != null && adUser.Languages.Count > 0)
     {
         this.PreferredCulture = adUser.Languages[0];
     }
 }
示例#3
0
 private NspiPrincipal(MiniRecipient miniRecipient)
 {
     this.LegacyDistinguishedName = miniRecipient.LegacyExchangeDN;
     if (string.IsNullOrEmpty(this.LegacyDistinguishedName))
     {
         this.LegacyDistinguishedName = LegacyDN.FormatLegacyDnFromGuid(Guid.Empty, (Guid)miniRecipient[ADObjectSchema.Guid]);
     }
     this.AddressBookPolicy   = miniRecipient.AddressBookPolicy;
     this.OrganizationId      = miniRecipient.OrganizationId;
     this.DirectorySearchRoot = miniRecipient.QueryBaseDN;
     this.PrimarySmtpAddress  = miniRecipient.PrimarySmtpAddress;
     this.ExchangeGuid        = miniRecipient.ExchangeGuid;
     this.MAPIEnabled         = miniRecipient.MAPIEnabled;
     this.Database            = miniRecipient.Database;
     this.ExchangeVersion     = miniRecipient.ExchangeVersion;
     if (miniRecipient.Languages != null && miniRecipient.Languages.Count > 0)
     {
         this.PreferredCulture = miniRecipient.Languages[0];
     }
 }