Пример #1
0
 protected override void OnOpened()
 {
     if (this.Endpoint != null)
     {
         ClientCredentials credentials = this.Endpoint.Behaviors.Find <ClientCredentials>();
         if (credentials != null)
         {
             ClientCredentials credentials2 = credentials.Clone();
             credentials2.MakeReadOnly();
             this.readOnlyClientCredentials = credentials2;
         }
     }
     base.OnOpened();
 }
Пример #2
0
 protected override void OnOpened()
 {
     // if a client credentials has been configured cache a readonly snapshot of it
     if (this.Endpoint != null)
     {
         ClientCredentials credentials = this.Endpoint.Behaviors.Find <ClientCredentials>();
         if (credentials != null)
         {
             ClientCredentials credentialsCopy = credentials.Clone();
             credentialsCopy.MakeReadOnly();
             _readOnlyClientCredentials = credentialsCopy;
         }
     }
     base.OnOpened();
 }