Represents current Azure session.
Exemplo n.º 1
0
        private static void InitializeConfigs(AzureSession session, string profilePath)
        {
            var fallbackList = new List <string>()
            {
                Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".Azure", "PSConfig.json"),
                Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), ".Azure", "PSConfig.json")
            };
            ConfigInitializer configInitializer = new ConfigInitializer(fallbackList);

            configInitializer.MigrateConfigs(profilePath);
            configInitializer.InitializeForAzureSession(session);
        }
 /// <summary>
 /// Create a new session and replace any existing session
 /// </summary>
 public static void CreateOrReplaceSession(IDataStore dataStore)
 {
     AzureSession.Initialize(() => CreateInstance(dataStore), true);
 }
 /// <summary>
 /// Initialize the azure session if it is not already initialized
 /// </summary>
 public static void InitializeAzureSession()
 {
     AzureSession.Initialize(() => CreateInstance());
 }