示例#1
0
 public void Initialize()
 {
     actionStrategy = new ActionStrategy();
     builderContext = new MockBuilderContext(actionStrategy);
     workItem       = new TestableRootWorkItem();
     builderContext.Locator.Add(new DependencyResolutionLocatorKey(typeof(WorkItem), null), workItem);
     actionCatalog = workItem.Services.AddNew <MockActionCatalog, IActionCatalogService>();
 }
示例#2
0
文件: Ant.cs 项目: CaptpBdcht/AntHill
        public override sealed void Resolve(World world)
        {
            ChooseAction(world);
            ChooseTimeEffect();

            ActionStrategy.Act(this, world);
            TimeStrategy.Endure(this, world);
        }