Azavea.Open.DAO.ConnectionDescriptor.LoadFromConfig C# (CSharp) Method

LoadFromConfig() public static method

This is a factory method, that will load the appropriate type of connection descriptor using the given config. It first searches for config item(s) called "ConnectionConfigSection" and/or "ConnectionConfig". (ConnectionConfig should be an "app name" for a config, not a file name). If present, it will use those to load from another section in this or another config file. This allows more dynamic install-time configuration of DB connections. You may daisy-chain the configuration if you wish. Once in the connection configuration section, it will first search for the "DescriptorClass" config item, and use that class if specified. If not, defaults to an OleDbDescriptor (which means it should be backwards compatible for all our existing config files).
public static LoadFromConfig ( Config cfg, string section ) : IConnectionDescriptor
cfg Azavea.Open.Common.Config Config to load the descriptor info from.
section string What section of that config has the DB connection info in it.
return IConnectionDescriptor
        public static IConnectionDescriptor LoadFromConfig(Config cfg, string section)
        {
            return LoadFromConfig(cfg, section, null);
        }

Same methods

ConnectionDescriptor::LoadFromConfig ( Config cfg, string section, ConnectionInfoDecryptionDelegate decryptionDelegate ) : IConnectionDescriptor