Inheritance: System.Configuration.ConfigurationElement
Exemplo n.º 1
0
        public JobServiceProxy(ServerConfiguration configuration)
        {
            // TODO:config.
            _caCertificate = new X509Certificate2().LoadFromPemFile("ca.crt");

            _serverMode = configuration.Mode;
            _uri = new UriBuilder("net.tcp", configuration.Address, configuration.Port, "master").Uri;
            _masterCommonName = configuration.CommonName;

            _certificatePemFile = configuration.CertificatePemFile;
        }
 public AuthenticationRequestProxy(ServerConfiguration configuration)
 {
     _serverMode = configuration.Mode;
     _uri = new UriBuilder("net.tcp", configuration.Address, configuration.Port, "authreq").Uri;
 }
Exemplo n.º 3
0
        public MasterServer(ServerConfiguration configuration)
        {
            // TODO:config.
            _caCertificate = new X509Certificate2().LoadFromPemFile("ca.crt");

            _serverMode = configuration.Mode;
            _uri = new UriBuilder("net.tcp", configuration.Address, configuration.Port).Uri;

            if (Path.IsPathRooted(configuration.CertificatePemFile))
                _certificatePemFile = configuration.CertificatePemFile;
            else
            {
                _certificatePemFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                                                   configuration.CertificatePemFile);
            }
        }