Src/Black.Beard.ComponentModel/ComponentModel/Factories/Factory1.cs
/// <summary>
/// Creates a new instance of T with the specified arguments.
/// </summary>
/// <param name="args">The arguments.</param>
/// <returns></returns>
Creates a new instance of T with the specified arguments.
Creates a new instance of T with the specified arguments .
[System.Diagnostics.DebuggerStepThrough]
        [System.Diagnostics.DebuggerNonUserCode]
        public T Call(string key, params dynamic[] args)
        {
            if (this.IsCtor && args.Length == 0)
            {
                if (!this._dic.TryGetValue(key, out T result))
                    this._dic.Add(key, result = _delegate(args));
                return result;
            }
            return _delegate(args);
        }
[ System . Diagnostics . DebuggerStepThrough ] [ System . Diagnostics . DebuggerNonUserCode ] public T Call ( string key , params dynamic [ ] args ) { if ( this . IsCtor && args . Length == 0 ) { if ( ! this . _dic . TryGetValue ( key , out T result ) ) this . _dic . Add ( key , result = _delegate ( args ) ) ; return result ; } return _delegate ( args ) ; }
Creates a new instance of T with the specified arguments.
Creates a new instance of T with the specified arguments .
None
key
string
args
None