コード例 #1
0
        public static void ResetImplementation(string configurationFilepath, bool refreshing)
        {
            string rootedConfigurationFilepath = RootConfigurationFilePath(configurationFilepath);
            FileConfigurationSourceImplementation currentImplementation = null;

            implementationByFilepath.TryGetValue(rootedConfigurationFilepath, out currentImplementation);
            implementationByFilepath[rootedConfigurationFilepath] = new FileConfigurationSourceImplementation(rootedConfigurationFilepath, refreshing);

            if (currentImplementation != null)
            {
                currentImplementation.Dispose();
            }
        }
コード例 #2
0
 private static void EnsureImplementation(string rootedConfigurationFile)
 {
     if (!implementationByFilepath.ContainsKey(rootedConfigurationFile))
     {
         lock (lockObject)
         {
             if (!implementationByFilepath.ContainsKey(rootedConfigurationFile))
             {
                 FileConfigurationSourceImplementation implementation = new FileConfigurationSourceImplementation(rootedConfigurationFile);
                 implementationByFilepath.Add(rootedConfigurationFile, implementation);
             }
         }
     }
 }
コード例 #3
0
		private static void EnsureImplementation(string rootedConfigurationFile)
		{
			if (!implementationByFilepath.ContainsKey(rootedConfigurationFile))
			{
				lock (lockObject)
				{
					if (!implementationByFilepath.ContainsKey(rootedConfigurationFile))
					{
						FileConfigurationSourceImplementation implementation = new FileConfigurationSourceImplementation(rootedConfigurationFile);
						implementationByFilepath.Add(rootedConfigurationFile, implementation);
					}
				}
			}
		}
コード例 #4
0
		public static void ResetImplementation(string configurationFilepath, bool refreshing)
		{
			string rootedConfigurationFilepath = RootConfigurationFilePath(configurationFilepath);
			FileConfigurationSourceImplementation currentImplementation = null;
			implementationByFilepath.TryGetValue(rootedConfigurationFilepath, out currentImplementation);
			implementationByFilepath[rootedConfigurationFilepath] = new FileConfigurationSourceImplementation(rootedConfigurationFilepath, refreshing);

			if (currentImplementation != null)
			{
				currentImplementation.Dispose();
			}
		}