Esempio n. 1
0
    private static string GetDefineKey(IDefine define)
    {
      if (define.Format == MagickFormat.Unknown)
        return define.Name;

      return EnumHelper.GetName(define.Format) + ":" + define.Name;
    }
Esempio n. 2
0
        public void Given_an_operation_that_repeats_once()
        {
            _workflow = Workflow <string> .Definition();

            _workflow.Do((s) => s += "Red").Repeat().Once();
            _flow = _workflow as Workflow <string>;
        }
Esempio n. 3
0
        public void Given()
        {
            _builder = new Mock <SequentialBuilder <Colour> >(new [] { new TaskList <Colour>() });
            var activator = Mock.Of <SequentialBuilderActivator <Colour> >(x => x.Activate() == _builder.Object);

            _flow = new Workflow <Colour>(new Dispatcher <Colour>(), activator, new ParallelBuilderActivator <Colour>(new TaskList <Colour>()));
        }
Esempio n. 4
0
        private static string GetDefineKey(IDefine define)
        {
            if (define.Format == MagickFormat.Unknown)
            {
                return(define.Name);
            }

            return(EnumHelper.GetName(define.Format) + ":" + define.Name);
        }
        public IParserData TryResolveDefine(IDefine parserData, bool caseSensitive)
        {
            string contents = parserData.Contents;

            if (contents.EndsWith("("))
            {
                contents = contents.Remove(contents.Length - 1);
            }

            var possibleData = GetParserData(contents, caseSensitive).ToList();
            var resolvedType = possibleData.FirstOrDefault();

            return(resolvedType);
        }
Esempio n. 6
0
        public override void Configure(IDefine <Colour> workflow)
        {
            var doubleSpace = new DoubleSpace();

            workflow
            .Do(doubleSpace)
            .Do <DoubleSpace>(If.Not.Successfull(doubleSpace))
            .Do((c) =>
            {
                Console.WriteLine(c.Name);
                return(c);
            });

            Workflow = workflow as IWorkflow <Colour>;
        }
Esempio n. 7
0
 public override void Configure(IDefine <Colour> workflow)
 {
 }
Esempio n. 8
0
 public RainbowColours(IDefine <Colour> workflow) : base(workflow)
 {
 }
Esempio n. 9
0
 public abstract void Configure(IDefine <T> workflow);
Esempio n. 10
0
 /// <summary>
 /// Configures the workflow with a workflow configuration object
 /// </summary>
 /// <param name="workflow">Workflow configuration obejct</param>
 protected AsAWorkflow(IDefine <T> workflow)
 {
     Check.IsNotNull(workflow, "workfow definer");
     Configurer = workflow;
 }
Esempio n. 11
0
 public InterSet(IDefine idf, ISearch isa, ISummery ism)
 {
     this.Def = idf;
     this.Sea = isa;
     this.Sum = ism;
 }
 public void Given()
 {
     _builder = new Mock<SequentialBuilder<Colour>>(new []{new TaskList<Colour>()});
     var activator = Mock.Of<SequentialBuilderActivator<Colour>>(x => x.Activate() == _builder.Object);
     _flow = new Workflow<Colour>(new Dispatcher<Colour>(), activator, new ParallelBuilderActivator<Colour>(new TaskList<Colour>()));
 }
Esempio n. 13
0
 public static string GetAsText(this IDefine aThis)
 {
     return("%define " + aThis.Symbol + " 1");
 }
Esempio n. 14
0
 public virtual void SetECSComponentConverting(GameObjectConversionSystem conversionSystem,
                                               Component conventionComponent, EntityManager entityManager, Entity entity, IDefine define)
 {
     //默认与SetECSComponent一致
     SetECSComponent(entityManager, entity, define);
 }
Esempio n. 15
0
 public virtual void SetECSComponent(EntityManager entityManager, Entity entity, IDefine define)
 {
     //默认不创建ECS组件
 }