public static AnchorRunspaceProxy.RunspaceFactoryWithDCAffinity CreateRbacFactory(AnchorContext context, string affinityToken, IIdentity tenantIdentity, ExchangeRunspaceConfigurationSettings configSettings)
            {
                InitialSessionState initialSessionState;

                try
                {
                    initialSessionState = new ExchangeExpiringRunspaceConfiguration(tenantIdentity, configSettings).CreateInitialSessionState();
                    initialSessionState.LanguageMode = PSLanguageMode.FullLanguage;
                }
                catch (CmdletAccessDeniedException ex)
                {
                    context.Logger.Log(MigrationEventType.Warning, ex, "AnchorRunspaceProxy. error creating session for user {0}", new object[]
                    {
                        tenantIdentity
                    });
                    throw new UserDoesNotHaveRBACException(tenantIdentity.ToString(), ex);
                }
                catch (AuthzException ex2)
                {
                    context.Logger.Log(MigrationEventType.Error, ex2, "AnchorRunspaceProxy. authorization error creating session for user {0}", new object[]
                    {
                        tenantIdentity
                    });
                    throw new UserDoesNotHaveRBACException(tenantIdentity.ToString(), ex2);
                }
                return(new AnchorRunspaceProxy.RunspaceFactoryWithDCAffinity(affinityToken, new BasicInitialSessionStateFactory(initialSessionState), new BasicPSHostFactory(typeof(RunspaceHost), true)));
            }
            // Token: 0x06000E80 RID: 3712 RVA: 0x000572B8 File Offset: 0x000554B8
            public static AssistantRunspaceProxy.RunspaceFactoryWithDCAffinity CreateRbacFactory(OrganizationId organizationId, IIdentity tenantIdentity, ExchangeRunspaceConfigurationSettings configSettings)
            {
                InitialSessionState initialSessionState;

                try
                {
                    initialSessionState = new ExchangeExpiringRunspaceConfiguration(tenantIdentity, configSettings).CreateInitialSessionState();
                    initialSessionState.LanguageMode = PSLanguageMode.FullLanguage;
                }
                catch (CmdletAccessDeniedException innerException)
                {
                    throw new UserDoesNotHaveRBACException(tenantIdentity.ToString(), innerException);
                }
                catch (AuthzException innerException2)
                {
                    throw new UserDoesNotHaveRBACException(tenantIdentity.ToString(), innerException2);
                }
                return(new AssistantRunspaceProxy.RunspaceFactoryWithDCAffinity(organizationId, new BasicInitialSessionStateFactory(initialSessionState), new BasicPSHostFactory(typeof(RunspaceHost), true)));
            }