Exemplo n.º 1
0
        static void Main(string[] args)
        {
#if DotNetStandard
            Console.WriteLine("WARN : Linux .NET Core not support name EventWaitHandle");
#else
            bool            createdProcessWait;
            EventWaitHandle processWait = new EventWaitHandle(false, EventResetMode.ManualReset, "AutoCSer.TestCase.TcpInternalServer", out createdProcessWait);
            if (createdProcessWait)
            {
                using (processWait)
                {
#endif
            Console.WriteLine(@"http://www.AutoCSer.com/TcpServer/MethodServer.html
");
            Console.WriteLine(RefOut.TestCase());
            Console.WriteLine(NoAttribute.TestCase());
            Console.WriteLine(Static.TestCase());
            Console.WriteLine(Field.TestCase());
            Console.WriteLine(Property.TestCase());
            Console.WriteLine(ClientAsynchronous.TestCase());
#if !DOTNET2 && !DOTNET4
            Console.WriteLine(ClientTaskAsync.TestCase());
#endif
            Console.WriteLine(SendOnly.TestCase());
            Console.WriteLine(Asynchronous.TestCase());
            Console.WriteLine(KeepCallback.TestCase());
            Console.WriteLine(Expression.TestCase());
            Console.WriteLine("Over");
            Console.ReadKey();
#if !DotNetStandard
        }
    }
#endif
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            bool            createdProcessWait;
            EventWaitHandle processWait = new EventWaitHandle(false, EventResetMode.ManualReset, "AutoCSer.Example.TcpInternalServer", out createdProcessWait);

            if (createdProcessWait)
            {
                using (processWait)
                {
                    Console.WriteLine(@"http://www.AutoCSer.com/TcpServer/MethodServer.html
");
                    Console.WriteLine(NoAttribute.TestCase());
                    Console.WriteLine(Static.TestCase());
                    Console.WriteLine(Field.TestCase());
                    Console.WriteLine(Property.TestCase());
                    Console.WriteLine(RefOut.TestCase());
                    Console.WriteLine(ClientAsynchronous.TestCase());
#if DOTNET2
#else
#if DOTNET4
#else
                    Console.WriteLine(ClientTaskAsync.TestCase());
#endif
#endif
                    Console.WriteLine(SendOnly.TestCase());
                    Console.WriteLine(Asynchronous.TestCase());
                    Console.WriteLine(KeepCallback.TestCase());
                    Console.WriteLine("Over");
                    Console.ReadKey();
                }
            }
        }