コード例 #1
0
        public void Init()
        {
            AzureCPConfig configFromConfigDB = AzureCPConfig.GetConfiguration(UnitTestsHelper.ClaimsProviderConfigName, UnitTestsHelper.SPTrust.Name);

            // Create a local copy, otherwise changes will impact the whole process (even without calling Update method)
            Config = configFromConfigDB.CopyPersistedProperties();
            // Reset configuration to test its default for the tests
            Config.ResetCurrentConfiguration();
        }
コード例 #2
0
    public static void InitializeConfiguration(AzureCPConfig config)
    {
        config.ResetCurrentConfiguration();

#if DEBUG
        config.Timeout = 99999;
#endif

        string             json         = File.ReadAllText(AzureTenantsJsonFile);
        List <AzureTenant> azureTenants = JsonConvert.DeserializeObject <List <AzureTenant> >(json);
        config.AzureTenants = azureTenants;
        config.Update();
    }
コード例 #3
0
    public static void InitializeConfiguration(AzureCPConfig config)
    {
        config.ResetCurrentConfiguration();

#if DEBUG
        config.Timeout = 99999;
#endif

        string             json         = File.ReadAllText(AzureTenantsJsonFile);
        List <AzureTenant> azureTenants = JsonConvert.DeserializeObject <List <AzureTenant> >(json);
        config.AzureTenants = azureTenants;
        config.Update();
        Trace.WriteLine($"{DateTime.Now.ToString("s")} Set {config.AzureTenants.Count} Azure AD tenants to AzureCP configuration");
    }