Пример #1
0
        public object Execute(IInputs inputs)
        {
            var p1 = (int)inputs.GetValue("out1");
            var p2 = (int)inputs.GetValue("out2");
            var p3 = (int)inputs.GetValue("out4");

            Thread.Sleep(100);
            return(p1 + p2 + p3);
        }
Пример #2
0
        public object Execute(IInputs inputs)
        {
            var p1 = (int)inputs.GetValue();

            //Thread.Sleep(100);
            return(p1 + 100);
        }
Пример #3
0
        public void Execute(IInputs input, IOutput output)
        {
            var p1 = (int)input.GetValue();

            System.Diagnostics.Debug.WriteLine("BlotMock4" + Thread.CurrentThread.ManagedThreadId);
            Thread.Sleep(400);
            System.Diagnostics.Debug.WriteLine("BlotMock4" + Thread.CurrentThread.ManagedThreadId);
            output.Emit("out4", p1 + 40);
        }
Пример #4
0
 public void Execute(IInputs input, IOutput output)
 {
     if (i == 0)
     {
         i++;
         throw new NotImplementedException();
     }
     else
     {
         var p1 = (int)input.GetValue();
         System.Diagnostics.Debug.WriteLine("BlotMock1" + Thread.CurrentThread.ManagedThreadId);
         Thread.Sleep(100);
         System.Diagnostics.Debug.WriteLine("BlotMock1" + Thread.CurrentThread.ManagedThreadId);
         output.Emit("out1", p1 + 10);
     }
 }
Пример #5
0
        public void Execute(IInputs input, IOutput output)
        {
            var p1 = (int)input.GetValue();

            lock (count)
            {
                int c = 0;
                if (count.TryGetValue(Thread.CurrentThread.ManagedThreadId, out c))
                {
                    c++;
                }
                else
                {
                    count.Add(Thread.CurrentThread.ManagedThreadId, 1);
                }
            }

            // System.Diagnostics.Debug.WriteLine("BlotMock1 " + Thread.CurrentThread.ManagedThreadId);
            Thread.Sleep(3000);
            // System.Diagnostics.Debug.WriteLine("BlotMock1" + Thread.CurrentThread.ManagedThreadId);
            output.Emit("out1", p1 + 10);
        }