Exemplo n.º 1
0
        public void ShowExample()
        {
            Console.WriteLine("Задание 1. Пример 1:");

            ShowDateTime showDateTimeLong = () => new CurrentDateTime("D");

            showDateTimeLong().ShowFormatedDateTime();

            ShowDateTime showDateTimeShort = () => new CurrentDateTime("d");

            showDateTimeShort().ShowFormatedDateTime();
        }
Exemplo n.º 2
0
        static void Main()
        {
            ShowDateTime workflow1 = new ShowDateTime();
            WorkflowInvoker.Invoke(workflow1);

            DelegateInArgument<string> str = new DelegateInArgument<string>();
            ShowDateTimeAsAction workflow2 = new ShowDateTimeAsAction()
            {
                CustomAction = new ActivityAction<string>()
                {
                    Argument = str,
                    Handler = new WriteLine()
                    {
                        Text = new InArgument<string>(str)
                    }
                }
            };

            WorkflowInvoker.Invoke(workflow2);

            Console.WriteLine("Hit <enter> to exit...");
            Console.ReadLine();
        }
Exemplo n.º 3
0
        static void Main()
        {
            ShowDateTime workflow1 = new ShowDateTime();

            WorkflowInvoker.Invoke(workflow1);

            DelegateInArgument <string> str       = new DelegateInArgument <string>();
            ShowDateTimeAsAction        workflow2 = new ShowDateTimeAsAction()
            {
                CustomAction = new ActivityAction <string>()
                {
                    Argument = str,
                    Handler  = new WriteLine()
                    {
                        Text = new InArgument <string>(str)
                    }
                }
            };

            WorkflowInvoker.Invoke(workflow2);

            Console.WriteLine("Hit <enter> to exit...");
            Console.ReadLine();
        }