protected override void EstablishContext()
        {
            argumentMap = new ArgumentMap
            {
                { "Go", new[] { "1", "2", "3" }}
            };

            argumentKey = new CollectionArgumentKey<int>("Go");
        }
        protected override void EstablishContext()
        {
            argumentMap = new ArgumentMap
            {
                { "Foo", new[] {"22"}}
            };

            argumentKey = new SimpleArgumentKey<int>("Foo");
        }
Beispiel #3
0
        protected override void Before_each_spec()
        {
            _command = Create<HelpCommand>();

             _container = Mock<IWindsorContainer>();
             Locator.InitializeContainer(_container);

             _commandWeWantHelpFor = new FakeCommand1();

             SetupResult.For(_container.Resolve<ICommand>("fake-command-1")).Return(_commandWeWantHelpFor);

             _argumentMap = Mock<IArgumentMap>();
             SetupResult.For(Get<IArgumentMapFactory>().CreateMap(_commandWeWantHelpFor)).Return(_argumentMap);
             SetupResult.For(_argumentMap.Usage).Return("usage");
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Arguments"/> class.
        /// </summary>
        /// <param name="argumentMap">The dictionary.</param>
        public Arguments(IArgumentMap argumentMap)
        {
            Guard.AgainstArgumentNull(argumentMap, "argumentMap");

            _argumentMap = argumentMap;
        }
        protected override void EstablishContext()
        {
            argumentMap = new ArgumentMap
            {
                { "Go", new[] { "Go", "Gadgetto", "mat" }},
                { "No", new[] { "more", "heroes" }}
            };

            argumentKey = new CollectionArgumentKey<string>("Go");
        }
 protected override void EstablishContext()
 {
     argumentMap = new ArgumentMap();
     argumentKey = new CollectionArgumentKey<string>("Go");
 }
Beispiel #7
0
 protected override void EstablishContext()
 {
     argumentMap = new ArgumentMap();
     argumentKey = new CollectionArgumentKey <string>("Go");
 }
Beispiel #8
0
 public ActivationExpression(LambdaExpression expression, Func <Tuple, TResult> compiledExpression, IArgumentMap argumentMap)
 {
     _expression         = expression;
     _compiledExpression = compiledExpression;
     _argumentMap        = argumentMap;
 }