Пример #1
0
 public UnaryOpIn(IIn <T> source, Func <Expression, Expression> op, Func <T, T> elementOperator)
 {
     _source          = source;
     _operator        = op;
     _elementOperator = op.Compile <T, T>();
     _changedEvent    = EventHelper.CreateChangedEvent(this, source.ChangedEvent);
 }
Пример #2
0
 public ProcessBlock(AbsTimeGenerator _timeGenerator, IOut _queue, IIn _nextBlock)
 {
     m_isRequestHere = false;
     m_timeGenerator = _timeGenerator;
     m_queue = _queue;
     m_nextBlock = _nextBlock;
 }
Пример #3
0
 public virtual void AddChild(IIn <C> node)
 {
     if (this._children.Count > 0)
     {
         throw new NotSupportedException("This node accepts only one child, there is already one child added.");
     }
     this._children.Add(node);
 }
Пример #4
0
    public static int Main()
    {
        IIn <object> test = null;

        Foo(test);

        return(0);
    }
Пример #5
0
 public override void AddChild(IIn <T> node)
 {
     if (!this.children.IsNullOrEmpty())
     {
         throw new TreeBuilderException("ActionNode can have only one child", this);
     }
     base.AddChild(node);
 }
Пример #6
0
 public BinaryOpIn(IIn <T> left, IIn <T> right, Func <Expression, Expression, Expression> op,
                   Func <T, T, T> elementOperator)
 {
     _left            = left;
     _right           = right;
     _operator        = op;
     _elementOperator = elementOperator;
     _changedEvent    = EventHelper.CreateChangedEvent(this, left.ChangedEvent | right.ChangedEvent);
 }
Пример #7
0
        public static void Entry()
        {
            IOut <string> s = new BlaOut <string>()
            {
                field = "123"
            };
            IOut <object> o   = s;
            object        res = o.Foo();

            IIn <object> o2 = new BlaIn <object>();
            IIn <string> s2 = o2;

            s2.Foo("hello");

            IInOut <object, string> i0 = null;
            IInOut <string, object> i1 = i0;

            i1.FooIn("a");
            object o3 = i1.FooOut();
        }
Пример #8
0
        static void Main(string[] args)
        {
            var parenRef = new GenericClass <Parent>();
            var childRef = new GenericClass <Child>();

            IIn <Child> Ci = parenRef;
            I <Parent>  p  = parenRef;

            IOut <Parent> Po = childRef;
            I <Child>     c  = childRef;



            DOut <Parent> DGetP = GetParent;
            DOut <Child>  DGetC = GetChild;

            DGetP = DGetC;

            DIn <Parent> DSetP = SetParent;
            DIn <Child>  DSetC = SetChild;

            DSetC = DSetP;
        }
Пример #9
0
 public StandartQueue(IIn _statBlock)
 {
     m_statBlock = _statBlock;
     m_capacity = 10;
     m_full = 0;
 }
Пример #10
0
 static void Foo(IIn <string> f)
 {
 }
Пример #11
0
 public override void AddChild(IIn <T> node)
 {
     throw new NotSupportedException("AddChild method is forbiden for a DecisionNode, instead use SetNoChild or SetYesChild.");
 }
Пример #12
0
 static void Foo(IIn <Test> f)
 {
 }
Пример #13
0
 public void SetNoChild(IIn <T> node)
 {
     this.noChild = node;
 }
Пример #14
0
 public virtual void AddChild(IIn <C> node)
 {
     this.children.Add(node);
 }
Пример #15
0
 public void SetEndNode <T>(IIn <T> node) where T : class
 {
     this.end = node;
 }
Пример #16
0
 public void SetNextBlock(IIn _block)
 {
     m_in = _block;
 }
Пример #17
0
 public void SetYesChild(IIn <T> node)
 {
     this.yesChild = node;
 }
Пример #18
0
 public static EventSource CreateChangedEvent <T>(IIn <T> provider, EventSource eventSource)
 {
     return(new PredicatedEvent(null, eventSource,
                                () => !EqualityComparer <T> .Default.Equals(provider.Pre, provider.Cur),
                                null));
 }
Пример #19
0
 public Generator(AbsTimeGenerator _timeGenerator, IIn _nextBlock)
 {
     m_nextBlock = _nextBlock;
     m_timeGenerator = _timeGenerator;
     m_time = m_timeGenerator.Next();
 }
Пример #20
0
 public void SetStartNode <T>(IIn <T> startNode) where T : class
 {
     this.root = startNode;
 }