private void Initialize() { this.resolverSettings = new PeerResolverSettings(); this.transport = new PeerTransportBindingElement(); this.encoding = new BinaryMessageEncodingBindingElement(); this.peerSecurity = new PeerSecuritySettings(); }
internal void InitializeFrom(PeerSecuritySettings security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } this.Mode = security.Mode; if (security.Mode != SecurityMode.None) { this.Transport.InitializeFrom(security.Transport); } }
internal void InitializeFrom(PeerSecuritySettings security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } SetPropertyValueIfNotDefaultValue(ConfigurationStrings.Mode, security.Mode); if (security.Mode != SecurityMode.None) { this.Transport.InitializeFrom(security.Transport); } }
internal void ApplyConfiguration(PeerSecuritySettings security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } security.Mode = this.Mode; if (security.Mode != SecurityMode.None) { this.Transport.ApplyConfiguration(security.Transport); } }
#pragma warning disable CS0618 private static void GetNetPeerTcpBindingDetails(NetPeerTcpBinding binding, ref string name, ref string mode, ref string credentialType) { name = GetBindingName <NetPeerTcpBinding>(binding); PeerSecuritySettings peerSecuritySettings = binding.Security; mode = peerSecuritySettings?.Mode.ToString(); switch (peerSecuritySettings?.Mode) { case SecurityMode.None: credentialType = "N/A"; break; case SecurityMode.Transport: case SecurityMode.TransportWithMessageCredential: case SecurityMode.Message: credentialType = peerSecuritySettings.Transport?.CredentialType.ToString(); break; } }
internal void CopyTo(PeerSecuritySettings other) { other.mode = mode; other.Transport.CredentialType = Transport.CredentialType; }
internal PeerSecuritySettings(PeerSecuritySettings other) { this.mode = other.mode; this.transportSecurity = new PeerTransportSecuritySettings(other.transportSecurity); }
internal PeerSecuritySettings(PeerSecuritySettings other) { this.mode = other.mode; this.transportSecurity = new PeerTransportSecuritySettings(other.transportSecurity); }
void Initialize() { this.resolverSettings = new PeerResolverSettings(); transport = new PeerTransportBindingElement(); encoding = new BinaryMessageEncodingBindingElement(); peerSecurity = new PeerSecuritySettings(); }
internal void CopyTo (PeerSecuritySettings other) { other.mode = mode; other.Transport.CredentialType = Transport.CredentialType; }