Exemplo n.º 1
0
 // Token: 0x06000D5F RID: 3423 RVA: 0x0002874D File Offset: 0x0002694D
 public MailPublicFolderIdParameter(ADObject adObject) : this(adObject.Id)
 {
     if (adObject.OrganizationId != null && adObject.OrganizationId.ConfigurationUnit != null)
     {
         this.Organization = new OrganizationIdParameter(adObject.OrganizationId.OrganizationalUnit);
     }
 }
        // Token: 0x06000AFB RID: 2811 RVA: 0x00023698 File Offset: 0x00021898
        private OrganizationId ResolveOrganizationId(OrganizationId originalOrgId)
        {
            if (!OrganizationId.ForestWideOrgId.Equals(originalOrgId) || !base.IsMultitenancyEnabled())
            {
                return(originalOrgId);
            }
            string     text = null;
            ADObjectId adobjectId;

            if (base.InternalADObjectId != null)
            {
                text = base.InternalADObjectId.DistinguishedName;
            }
            else if (ADIdParameter.TryResolveCanonicalName(base.RawIdentity, out adobjectId))
            {
                text = adobjectId.DistinguishedName;
            }
            string orgName = base.RawIdentity;

            if (!string.IsNullOrEmpty(text))
            {
                try
                {
                    orgName = OrganizationIdParameter.GetHierarchicalIdentityFromDN(text);
                }
                catch (FormatException)
                {
                }
            }
            return(base.GetOrganizationId(originalOrgId, orgName));
        }
Exemplo n.º 3
0
 // Token: 0x06000D60 RID: 3424 RVA: 0x0002878C File Offset: 0x0002698C
 public MailPublicFolderIdParameter(PublicFolderId folderId)
 {
     this.folderId = folderId;
     if (folderId.OrganizationId != null)
     {
         this.Organization = new OrganizationIdParameter(folderId.OrganizationId.OrganizationalUnit);
     }
 }
Exemplo n.º 4
0
        // Token: 0x06000D5D RID: 3421 RVA: 0x00028700 File Offset: 0x00026900
        public MailPublicFolderIdParameter(string identity) : base(identity)
        {
            PublicFolderIdParameter publicFolderIdParameter = new PublicFolderIdParameter(identity, false);

            this.folderId = publicFolderIdParameter.PublicFolderId;
            if (publicFolderIdParameter.Organization != null && this.folderId != null)
            {
                this.Organization = publicFolderIdParameter.Organization;
            }
        }
Exemplo n.º 5
0
 // Token: 0x06000B2B RID: 2859 RVA: 0x00023F78 File Offset: 0x00022178
 public void Initialize(ObjectId objectId)
 {
     if (objectId == null)
     {
         throw new ArgumentNullException("objectId");
     }
     if (!(objectId is PublicFolderId))
     {
         throw new NotSupportedException("objectId: " + objectId.GetType().FullName);
     }
     this.PublicFolderId = (PublicFolderId)objectId;
     if (this.PublicFolderId.OrganizationId != null)
     {
         this.Organization = new OrganizationIdParameter(this.PublicFolderId.OrganizationId.OrganizationalUnit);
     }
 }
Exemplo n.º 6
0
 // Token: 0x06000B25 RID: 2853 RVA: 0x00023DCC File Offset: 0x00021FCC
 public PublicFolderIdParameter(PublicFolder publicFolder)
 {
     if (publicFolder == null)
     {
         throw new ArgumentNullException("publicFolder");
     }
     if (publicFolder.Identity == null)
     {
         throw new ArgumentNullException("publicFolder.Identity");
     }
     this.rawIdentity = publicFolder.Identity.ToString();
     ((IIdentityParameter)this).Initialize(publicFolder.Identity);
     if (publicFolder.OrganizationId != null && publicFolder.OrganizationId.OrganizationalUnit != null)
     {
         this.Organization = new OrganizationIdParameter(publicFolder.OrganizationId.OrganizationalUnit);
     }
 }
Exemplo n.º 7
0
        // Token: 0x06000452 RID: 1106 RVA: 0x0000F624 File Offset: 0x0000D824
        internal static OrganizationIdParameter ResolveTargetOrganizationIdParameter(OrganizationIdParameter organizationParameter, IIdentityParameter identity, OrganizationId currentOrganizationId, Task.ErrorLoggerDelegate errorHandler, Task.TaskWarningLoggingDelegate warningHandler)
        {
            OrganizationIdParameter organizationIdParameter = null;

            if (identity != null)
            {
                if (identity is MailPublicFolderIdParameter)
                {
                    organizationIdParameter = (identity as MailPublicFolderIdParameter).Organization;
                }
                else if (identity is PublicFolderIdParameter)
                {
                    organizationIdParameter = (identity as PublicFolderIdParameter).Organization;
                }
            }
            if (!currentOrganizationId.Equals(OrganizationId.ForestWideOrgId))
            {
                if (organizationIdParameter != null)
                {
                    errorHandler(new ManagementObjectNotFoundException(Strings.ErrorManagementObjectNotFound(identity.ToString())), ExchangeErrorCategory.Client, identity);
                }
            }
            else
            {
                if (organizationParameter != null)
                {
                    if (organizationIdParameter != null)
                    {
                        warningHandler(Strings.WarningDuplicateOrganizationSpecified(organizationParameter.ToString(), organizationIdParameter.ToString()));
                    }
                    organizationIdParameter = organizationParameter;
                }
                if (organizationIdParameter == null && !(identity is MailPublicFolderIdParameter))
                {
                    errorHandler(new ErrorMissOrganizationException(), ExchangeErrorCategory.Client, null);
                }
            }
            return(organizationIdParameter);
        }
Exemplo n.º 8
0
 // Token: 0x06000B52 RID: 2898 RVA: 0x000241ED File Offset: 0x000223ED
 public RecipientOrOrganizationIdParameter(INamedIdentity namedIdentity)
 {
     this.RecipientParameter    = new RecipientIdParameter(namedIdentity);
     this.OrganizationParameter = new OrganizationIdParameter(namedIdentity);
 }
Exemplo n.º 9
0
 // Token: 0x06000B51 RID: 2897 RVA: 0x000241CD File Offset: 0x000223CD
 public RecipientOrOrganizationIdParameter(ADObjectId adIdentity)
 {
     this.RecipientParameter    = new RecipientIdParameter(adIdentity);
     this.OrganizationParameter = new OrganizationIdParameter(adIdentity);
 }
Exemplo n.º 10
0
 // Token: 0x06000B50 RID: 2896 RVA: 0x000241AD File Offset: 0x000223AD
 public RecipientOrOrganizationIdParameter(string identity)
 {
     this.RecipientParameter    = new RecipientIdParameter(identity);
     this.OrganizationParameter = new OrganizationIdParameter(identity);
 }
Exemplo n.º 11
0
 // Token: 0x06000B5E RID: 2910 RVA: 0x00024301 File Offset: 0x00022501
 public RecipientOrOrganizationIdParameter(OrganizationId organizationId)
 {
     this.OrganizationParameter = new OrganizationIdParameter(organizationId);
 }
Exemplo n.º 12
0
 // Token: 0x06000451 RID: 1105 RVA: 0x0000F550 File Offset: 0x0000D750
 internal static OrganizationId ResolveTargetOrganization(Fqdn domainController, OrganizationIdParameter organization, ADObjectId rootOrgContainerId, OrganizationId currentOrganizationId, OrganizationId executingUserOrganizationId)
 {
     if (organization != null)
     {
         ADSessionSettings     sessionSettings = ADSessionSettings.FromOrganizationIdWithoutRbacScopes(rootOrgContainerId, currentOrganizationId, executingUserOrganizationId, false);
         IConfigurationSession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(domainController, true, ConsistencyMode.PartiallyConsistent, null, sessionSettings, ConfigScopes.TenantSubTree, 183, "ResolveTargetOrganization", "f:\\15.00.1497\\sources\\dev\\Configuration\\src\\ObjectModel\\BaseTasks\\MapiTaskHelper.cs");
         tenantOrTopologyConfigurationSession.UseConfigNC = false;
         ADOrganizationalUnit adorganizationalUnit  = null;
         LocalizedString?     localizedString       = null;
         IEnumerable <ADOrganizationalUnit> objects = organization.GetObjects <ADOrganizationalUnit>(null, tenantOrTopologyConfigurationSession, null, out localizedString);
         using (IEnumerator <ADOrganizationalUnit> enumerator = objects.GetEnumerator())
         {
             if (!enumerator.MoveNext())
             {
                 throw new ManagementObjectNotFoundException(Strings.ErrorOrganizationNotFound(organization.ToString()));
             }
             adorganizationalUnit = enumerator.Current;
             if (enumerator.MoveNext())
             {
                 throw new ManagementObjectAmbiguousException(Strings.ErrorOrganizationNotUnique(organization.ToString()));
             }
         }
         return(adorganizationalUnit.OrganizationId);
     }
     return(currentOrganizationId ?? executingUserOrganizationId);
 }
Exemplo n.º 13
0
        // Token: 0x06000B23 RID: 2851 RVA: 0x00023C30 File Offset: 0x00021E30
        internal PublicFolderIdParameter(string publicFolderIdString, bool isEntryId)
        {
            if (string.IsNullOrEmpty(publicFolderIdString))
            {
                throw new ArgumentNullException("publicFolderIdString");
            }
            this.rawIdentity = publicFolderIdString;
            PublicFolderId publicFolderId = null;

            try
            {
                int num = publicFolderIdString.IndexOf('\\');
                if (num < 0)
                {
                    if (isEntryId)
                    {
                        publicFolderId = new PublicFolderId(StoreObjectId.FromHexEntryId(publicFolderIdString));
                    }
                }
                else if (num == 0)
                {
                    if (publicFolderIdString.Length > 1 && publicFolderIdString[num + 1] == '\\')
                    {
                        throw new FormatException(Strings.ErrorIncompletePublicFolderIdParameter(publicFolderIdString));
                    }
                    publicFolderId = new PublicFolderId(MapiFolderPath.Parse(publicFolderIdString));
                }
                else
                {
                    if (!MapiTaskHelper.IsDatacenter)
                    {
                        throw new FormatException(Strings.ErrorIncompletePublicFolderIdParameter(publicFolderIdString));
                    }
                    if (num == publicFolderIdString.Length - 1)
                    {
                        throw new FormatException(Strings.ErrorIncompleteDCPublicFolderIdParameter(publicFolderIdString));
                    }
                    this.Organization = new OrganizationIdParameter(publicFolderIdString.Substring(0, num));
                    if (publicFolderIdString[num + 1] == '\\')
                    {
                        publicFolderId = new PublicFolderId(MapiFolderPath.Parse(publicFolderIdString.Substring(num + 1)));
                    }
                    else if (isEntryId)
                    {
                        publicFolderId = new PublicFolderId(StoreObjectId.FromHexEntryId(publicFolderIdString.Substring(num + 1)));
                    }
                }
            }
            catch (FormatException innerException)
            {
                throw new FormatException(MapiTaskHelper.IsDatacenter ? Strings.ErrorIncompleteDCPublicFolderIdParameter(this.rawIdentity) : Strings.ErrorIncompletePublicFolderIdParameter(this.rawIdentity), innerException);
            }
            catch (CorruptDataException innerException2)
            {
                throw new FormatException(MapiTaskHelper.IsDatacenter ? Strings.ErrorIncompleteDCPublicFolderIdParameter(this.rawIdentity) : Strings.ErrorIncompletePublicFolderIdParameter(this.rawIdentity), innerException2);
            }
            if (publicFolderId != null)
            {
                ((IIdentityParameter)this).Initialize(publicFolderId);
            }
        }