src/Azos/Conf/FactoryUtils.cs
/// <summary>
/// Creates an instance of appropriate configurable object as specified in supplied config node.
/// This function does not configure the instance
/// </summary>
Creates an instance of appropriate configurable object as specified in supplied config node.
This function does not configure the instance
Creates an instance of appropriate configurable object as specified in supplied config node . This function does not configure the instance
public static T Make<T>(IConfigSectionNode node, Type defaultType = null, object[] args = null)
        {
            try
            {
                var tName = (node!=null && node.Exists) ? node.AttrByName(CONFIG_TYPE_ATTR).Value : null;
                return make<T>(tName, defaultType, args);
            }
            catch(Exception error)
            {
                throw new ConfigException(string.Format(StringConsts.CONFIGURATION_TYPE_CREATION_ERROR,
                                                         (node!=null) ? node.RootPath : StringConsts.NULL_STRING,
                                                         error.ToMessageWithType()
                                                       ),
                                          error);
            }
        }
public static T Make < T > ( IConfigSectionNode node , Type defaultType = null , object [ ] args = null ) { try { var tName = ( node != null && node . Exists ) ? node . AttrByName ( CONFIG_TYPE_ATTR ) . Value : null ; return make < T > ( tName , defaultType , args ) ; } catch ( Exception error ) { throw new ConfigException ( string . Format ( StringConsts . CONFIGURATION_TYPE_CREATION_ERROR , ( node != null ) ? node . RootPath : StringConsts . NULL_STRING , error . ToMessageWithType ( ) ) , error ) ; } }
Creates an instance of appropriate configurable object as specified in supplied config node.
Creates an instance of appropriate configurable object as specified in supplied config node .
node
IConfigSectionNode
defaultType
Type
args
object[]