Ejemplo n.º 1
0
        public static AnchorRunspaceProxy CreateRunspaceForPartner(AnchorContext context, ADObjectId ownerId, ADUser tenantAdmin, string tenantOrganization)
        {
            AnchorUtil.ThrowOnNullArgument(ownerId, "ownerId");
            AnchorUtil.ThrowOnNullArgument(tenantAdmin, "tenantAdmin");
            AnchorUtil.ThrowOnNullOrEmptyArgument(tenantOrganization, "tenantOrganization");
            context.Logger.Log(MigrationEventType.Verbose, "AnchorRunspaceProxy. Creating partner runspace proxy for user {0}", new object[]
            {
                tenantAdmin.Name
            });
            ExchangeRunspaceConfigurationSettings configSettings = new ExchangeRunspaceConfigurationSettings(ExchangeRunspaceConfigurationSettings.ExchangeApplication.SimpleDataMigration, tenantOrganization, ExchangeRunspaceConfigurationSettings.GetDefaultInstance().CurrentSerializationLevel);

            return(new AnchorRunspaceProxy(context, AnchorRunspaceProxy.RunspaceFactoryWithDCAffinity.CreateRbacFactory(context, ownerId.ToString(), new GenericSidIdentity(tenantAdmin.Name, string.Empty, tenantAdmin.Sid), configSettings)));
        }
Ejemplo n.º 2
0
        public static AnchorRunspaceProxy CreateRunspaceForDelegatedPartner(AnchorContext context, DelegatedPrincipal delegatedPartnerAdmin, string tenantOrganization)
        {
            AnchorUtil.ThrowOnNullArgument(delegatedPartnerAdmin, "delegatedTenantAdmin");
            AnchorUtil.ThrowOnNullOrEmptyArgument(tenantOrganization, "tenantOrganization");
            context.Logger.Log(MigrationEventType.Verbose, "AnchorRunspaceProxy. Creating delegated partner runspace proxy for user {0}", new object[]
            {
                delegatedPartnerAdmin
            });
            ExchangeRunspaceConfigurationSettings configSettings = new ExchangeRunspaceConfigurationSettings(ExchangeRunspaceConfigurationSettings.ExchangeApplication.SimpleDataMigration, tenantOrganization, ExchangeRunspaceConfigurationSettings.GetDefaultInstance().CurrentSerializationLevel);

            return(new AnchorRunspaceProxy(context, AnchorRunspaceProxy.RunspaceFactoryWithDCAffinity.CreateRbacFactory(context, delegatedPartnerAdmin.ToString(), delegatedPartnerAdmin.Identity, configSettings)));
        }
        // Token: 0x06000E73 RID: 3699 RVA: 0x00056DF4 File Offset: 0x00054FF4
        public static AssistantRunspaceProxy CreateRunspaceForPartner(ADObjectId ownerId, ADUser tenantAdmin, string tenantOrganization, IPublicFolderMailboxLoggerBase logger)
        {
            ArgumentValidator.ThrowIfNull("ownerId", ownerId);
            ArgumentValidator.ThrowIfNull("tenantAdmin", tenantAdmin);
            ArgumentValidator.ThrowIfNullOrEmpty("tenantOrganization", tenantOrganization);
            logger.LogEvent(LogEventType.Verbose, string.Format("AssistantRunspaceProxy. Creating partner runspace proxy for user {0}", tenantAdmin.Name));
            ExchangeRunspaceConfigurationSettings configSettings = new ExchangeRunspaceConfigurationSettings(ExchangeRunspaceConfigurationSettings.ExchangeApplication.SimpleDataMigration, tenantOrganization, ExchangeRunspaceConfigurationSettings.GetDefaultInstance().CurrentSerializationLevel);

            return(new AssistantRunspaceProxy(AssistantRunspaceProxy.RunspaceFactoryWithDCAffinity.CreateRbacFactory(tenantAdmin.OrganizationId, new GenericSidIdentity(tenantAdmin.Name, string.Empty, tenantAdmin.Sid), configSettings)));
        }