コード例 #1
0
        static void Main(string[] args)
        {
            PasswordGuessing temp = new PasswordGuessing();

            Info.CountCore          = Environment.ProcessorCount;
            Info.PasswordsPerSecond = temp.SpeedTest();

            if (!ProcessingMessage.Connecting(@"FormatName:DIRECT=OS:winserver\private$\mainqueue"))
            {
                Environment.Exit(1);
            }

            while (true)
            {
                ProcessingMessage.ChekMessage(QueueReceive);
            }
        }
コード例 #2
0
        static void Main(string[] args)
        {
            SetInfo();
            if (!ProcessingMessage.Connecting())
            {
                Environment.Exit(1);
            }

            while (true)
            {
                var messageRead = ProcessingMessage._queueReceive.Receive();

                Communication.Message message = (Communication.Message)messageRead.Body;

                foreach (var item in ProcessingMessage._messageHandler)
                {
                    if (item.Key == message.TypeMessage)
                    {
                        item.Value.DynamicInvoke(message);
                    }
                }
            }
        }