示例#1
0
        protected override void InitializeRuntime()
        {
            // Create a credit card service credentials and add it to the behaviors.
            CreditCardServiceCredentials serviceCredentials = new CreditCardServiceCredentials(this.creditCardFile);
            serviceCredentials.ServiceCertificate.SetCertificate("CN=localhost", StoreLocation.LocalMachine, StoreName.My);
            this.Description.Behaviors.Remove((typeof(ServiceCredentials)));
            this.Description.Behaviors.Add(serviceCredentials);

            // Register a credit card binding for the endpoint.
            Binding creditCardBinding = BindingHelper.CreateCreditCardBinding();
            this.AddServiceEndpoint(typeof(IEchoService), creditCardBinding, string.Empty);

            base.InitializeRuntime();
        }
        override protected void InitializeRuntime()
        {
            // Create a credit card service credentials and add it to the behaviors.
            CreditCardServiceCredentials serviceCredentials = new CreditCardServiceCredentials(this.creditCardFile);

            serviceCredentials.ServiceCertificate.SetCertificate("CN=localhost", StoreLocation.LocalMachine, StoreName.My);
            this.Description.Behaviors.Remove((typeof(ServiceCredentials)));
            this.Description.Behaviors.Add(serviceCredentials);

            // Register a credit card binding for the endpoint.
            Binding creditCardBinding = BindingHelper.CreateCreditCardBinding();

            this.AddServiceEndpoint(typeof(IEchoService), creditCardBinding, string.Empty);

            base.InitializeRuntime();
        }
 public CreditCardServiceCredentialsSecurityTokenManager(CreditCardServiceCredentials creditCardServiceCredentials)
     : base(creditCardServiceCredentials)
 {
     this.creditCardServiceCredentials = creditCardServiceCredentials;
 }
 public CreditCardServiceCredentialsSecurityTokenManager(CreditCardServiceCredentials creditCardServiceCredentials)
     : base(creditCardServiceCredentials)
 {
     this.creditCardServiceCredentials = creditCardServiceCredentials;
 }