Beispiel #1
0
 public CustomStream(Harness program, TcpClient client, bool SECURE)
 {
     if (SECURE)
     {
         this.secure_stream = new SslStream(client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null);
         this.program       = program;
         this.secure_stream.AuthenticateAsClient(BytesToIPv4String(this.program.remoteIP_bytes));
         this.SECURE = true;
     }
     else
     {
         this.clear_stream = client.GetStream();
         this.SECURE       = false;
     }
 }
Beispiel #2
0
        private static void Main(string[] args)
#endif
        {
            Harness hcon = new Harness();

            do
            {
                hcon.Run();
                Thread.Sleep(hcon.sleep);
            } while (hcon.sleep > 0);

            hcon.CleanUp();

#if HARNESS_DLL
            return(" ");
#endif
        }
Beispiel #3
0
 public CustomPSHostUserInterface(Harness program)
 {
     this.program = program;
 }
Beispiel #4
0
 public CustomPSHost(Harness program)
 {
     this.program = program;
     this._ui     = new CustomPSHostUserInterface(this.program);
 }
Beispiel #5
0
        private static void Main(string[] args)

#endif
        {

            Harness hcon = new Harness();
            hcon.run();

#if HARNESS_DLL

            return " ";
#endif
        }
Beispiel #6
0
 public CustomPSHostUserInterface(Harness program)
 {
     this.program = program;
     
 }
Beispiel #7
0
 public CustomPSHost(Harness program)
 {
     this.program = program;
     this._ui = new CustomPSHostUserInterface(program);
 }
Beispiel #8
0
        public CustomStream(Harness program, TcpClient client, bool SECURE)
        {

            if (SECURE)
            {
                this.secure_stream = new SslStream(client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null);
                this.program = program;
                this.secure_stream.AuthenticateAsClient(BytesToIPv4String(this.program.remoteIP_bytes));
                this.SECURE = true;
            }
            else
            {
                this.clear_stream = client.GetStream();
                this.SECURE = false;
            }

        }
Beispiel #9
0
        private static void Main(string[] args)

#endif
        {

            Harness hcon = new Harness();

            do
            {

                hcon.Run();
                Thread.Sleep(hcon.sleep);

            } while (hcon.sleep > 0);

            hcon.CleanUp();

#if HARNESS_DLL

            return " ";
#endif
        }