Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            if (args.Length < 3)
            {
                Help();
            }

            Hashtable configuration = new Hashtable()
            {
                { "requireSecurity", true }
            };
            int        port    = new Random().Next(1025, 65535);
            TcpChannel channel = (TcpChannel)RemotingHelper.RegisterRemoteChannel <TrackIt.Framework.
                                                                                   ErrorHandling.BaseException>("tcp", port, configuration, false);

            if (args[0] == "UploadFile")
            {
                UploadFile(args[1], args[2]);
            }
            else if (args[0] == "GetPasswords")
            {
                GetPasswords(args[1], args[2]);
            }
            else
            {
                Help();
            }
        }