public IActivationContext Get(IDictionary <string, object> parameter)
        {
            var source     = new TableSource <string, object>(parameter);
            var list       = new List <object>();
            var command    = new CompositeCommand <object>(new ApplyMemberValuesCommand(_accessors, _members, source), new AddItemsCommand(list));
            var alteration = new ConfiguringAlteration <object>(command);
            var activator  = new AlteringActivator(alteration, _activator.Invoke(source.Get));
            var result     = new ActivationContext(source, activator, list);

            return(result);
        }
Exemplo n.º 2
0
        public IActivationContext Get(IDictionary <string, object> parameter)
        {
            var source  = new TableSource <string, object>(parameter);
            var list    = new List <object>();
            var command = new CompositeCommand <object>(new ApplyMemberValuesCommand(_accessors, _members.Members,
                                                                                     source),
                                                        new AddItemsCommand(list));
            var alteration = new ConfiguringAlteration <object>(command);
            var activator  = new AlteringActivator(alteration, _activator(new Store(source, _table, _defaults).Get));
            var result     = new ActivationContext(_members.ReflectedType, source, activator.Singleton().Get, list);

            return(result);
        }
Exemplo n.º 3
0
        public IActivationContext Get(IDictionary <string, object> parameter)
        {
            var source  = new TableSource <string, object>(parameter);
            var list    = new List <object>();
            var command = new CompositeCommand <object>(new ApplyMemberValuesCommand(_accessors, _members, source),
                                                        new AddItemsCommand(list));
            var alteration = new ConfiguringAlteration <object>(command);
            var members    = _members.ToDictionary(x => x.Name, StringComparer.InvariantCultureIgnoreCase);
            var store      = new Store(source, new TableSource <string, IMember>(members));
            var activator  = new AlteringActivator(alteration, _activator.Invoke(store.Get));
            var result     = new ActivationContext(source, activator.Singleton()
                                                   .Get, list);

            return(result);
        }