Esempio n. 1
0
        static void Main(string[] args)
        {
            try
            {
                DefaultDiction.BuildDefaultResource();
                ClientEnvironment.IsRuntimeMode = true;
                RemotingConfiguration.Configure("Baumax.TestClient.exe.config", false);
                GenuineGlobalEventProvider.GenuineChannelsGlobalEvent += GenuineGlobalEventProvider_GenuineChannelsGlobalEvent;

                // Define channel security
                IEnumerator channelEnum = ChannelServices.RegisteredChannels.GetEnumerator();
                while (channelEnum.MoveNext())
                {
                    BasicChannelWithSecurity channel = channelEnum.Current as BasicChannelWithSecurity;
                    if (channel != null)
                    {
                        channel.ITransportContext.IKeyStore.SetKey("/BAUMAX/SES", new KeyProvider_SelfEstablishingSymmetric());
                    }
                }

                DoLogin();
                FullTest test = new FullTest();
                for (; ; )
                {
                    test.Run();
                }
            }
            catch(Exception ex)
            {
                Console.Out.WriteLine(ex.ToString());
                Console.In.ReadLine();
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            try
            {
                DefaultDiction.BuildDefaultResource();
                ClientEnvironment.IsRuntimeMode = true;
                RemotingConfiguration.Configure("Baumax.TestClient.exe.config", false);
                GenuineGlobalEventProvider.GenuineChannelsGlobalEvent += GenuineGlobalEventProvider_GenuineChannelsGlobalEvent;

                // Define channel security
                IEnumerator channelEnum = ChannelServices.RegisteredChannels.GetEnumerator();
                while (channelEnum.MoveNext())
                {
                    BasicChannelWithSecurity channel = channelEnum.Current as BasicChannelWithSecurity;
                    if (channel != null)
                    {
                        channel.ITransportContext.IKeyStore.SetKey("/BAUMAX/SES", new KeyProvider_SelfEstablishingSymmetric());
                    }
                }

                DoLogin();
                FullTest test = new FullTest();
                for (; ;)
                {
                    test.Run();
                }
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(ex.ToString());
                Console.In.ReadLine();
            }
        }