Exemplo n.º 1
0
        private IValueServiceBinder InnserSet(Type expectType, string name, bool checkexpectTypeNull)
        {
            if(checkexpectTypeNull && expectType == null) throw new ArgumentNullException(nameof(expectType));
            if(string.IsNullOrWhiteSpace(name)) throw new ArgumentNullException(nameof(name));

            var binder = new ValueServiceBinder(this._container, this, expectType, name);
            this.ValueBinders.Value.Add(binder);
            return binder;
        }
Exemplo n.º 2
0
        private IValueServiceBinder InnserSet(Type expectType, string name, bool checkexpectTypeNull)
        {
            if (checkexpectTypeNull && expectType == null)
            {
                throw new ArgumentNullException(nameof(expectType));
            }
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            var binder = new ValueServiceBinder(this._container, this, expectType, name);

            this.ValueBinders.Value.Add(binder);
            return(binder);
        }