ABB.Swum.Utilities.SwumConfiguration.SwumConfiguration C# (CSharp) Method

SwumConfiguration() static private method

Reads the configuration file associated with the current assembly.
static private SwumConfiguration ( ) : System
return System
        static SwumConfiguration()
        {
            string assemblyPath;
            Assembly currentAssembly = Assembly.GetExecutingAssembly();
            if(!string.IsNullOrWhiteSpace(currentAssembly.CodeBase)) {
                assemblyPath = new Uri(currentAssembly.CodeBase).LocalPath;
            } else {
                assemblyPath = currentAssembly.Location;
            }
            
            config = ConfigurationManager.OpenExeConfiguration(assemblyPath);
        }