/// <summary>
 /// Gets trace definition like: The SynchronizationContext has been set to null by DiscoveryClientChannel before initiating the Find operation.
 /// Event description ID=4821, Level=Informational, Channel=debug
 /// </summary>
 internal static void SynchronizationContextSetToNull()
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(20))
     {
         TD.WriteEtwEvent(20, null, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceInformationToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("SynchronizationContextSetToNull", Culture));
         TD.WriteTraceSource(20, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: The DiscoveryClient created inside DiscoveryClientChannel failed to close and hence has been aborted.
 /// Event description ID=4801, Level=Warning, Channel=debug
 /// </summary>
 /// <param name="exception">Exception associated with the event</param>
 internal static void DiscoveryClientInClientChannelFailedToClose(System.Exception exception)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, exception);
     if (TD.IsEtwEventEnabled(0))
     {
         TD.WriteEtwEvent(0, null, payload.SerializedException, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceWarningToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("DiscoveryClientInClientChannelFailedToClose", Culture));
         TD.WriteTraceSource(0, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: The DiscoveryClientChannel failed to open the channel with a discovered endpoint with EndpointAddress='{0}' and Via='{1}'. The DiscoveryClientChannel will now attempt to use the next available discovered endpoint.
 /// Event description ID=4818, Level=Warning, Channel=debug
 /// </summary>
 /// <param name="endpointAddress">Parameter 0 for event: The DiscoveryClientChannel failed to open the channel with a discovered endpoint with EndpointAddress='{0}' and Via='{1}'. The DiscoveryClientChannel will now attempt to use the next available discovered endpoint.</param>
 /// <param name="via">Parameter 1 for event: The DiscoveryClientChannel failed to open the channel with a discovered endpoint with EndpointAddress='{0}' and Via='{1}'. The DiscoveryClientChannel will now attempt to use the next available discovered endpoint.</param>
 /// <param name="exception">Exception associated with the event</param>
 internal static void InnerChannelOpenFailed(string endpointAddress, string via, System.Exception exception)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, exception);
     if (TD.IsEtwEventEnabled(17))
     {
         TD.WriteEtwEvent(17, null, endpointAddress, via, payload.SerializedException, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceWarningToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("InnerChannelOpenFailed", Culture), endpointAddress, via);
         TD.WriteTraceSource(17, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: The DiscoveryClientChannel successfully discovered an endpoint and opened the channel using it. The client is connected to a service using EndpointAddress='{0}' and Via='{1}'.
 /// Event description ID=4819, Level=Informational, Channel=debug
 /// </summary>
 /// <param name="endpointAddress">Parameter 0 for event: The DiscoveryClientChannel successfully discovered an endpoint and opened the channel using it. The client is connected to a service using EndpointAddress='{0}' and Via='{1}'.</param>
 /// <param name="via">Parameter 1 for event: The DiscoveryClientChannel successfully discovered an endpoint and opened the channel using it. The client is connected to a service using EndpointAddress='{0}' and Via='{1}'.</param>
 internal static void InnerChannelOpenSucceeded(string endpointAddress, string via)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(18))
     {
         TD.WriteEtwEvent(18, null, endpointAddress, via, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceInformationToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("InnerChannelOpenSucceeded", Culture), endpointAddress, via);
         TD.WriteTraceSource(18, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: The discoverability of endpoint with EndpointAddress='{0}' and ListenUri='{1}' has been enabled.
 /// Event description ID=4815, Level=Informational, Channel=debug
 /// </summary>
 /// <param name="endpointAddress">Parameter 0 for event: The discoverability of endpoint with EndpointAddress='{0}' and ListenUri='{1}' has been enabled.</param>
 /// <param name="listenUri">Parameter 1 for event: The discoverability of endpoint with EndpointAddress='{0}' and ListenUri='{1}' has been enabled.</param>
 internal static void EndpointDiscoverabilityEnabled(string endpointAddress, string listenUri)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(14))
     {
         TD.WriteEtwEvent(14, null, endpointAddress, listenUri, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceInformationToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("EndpointDiscoverabilityEnabled", Culture), endpointAddress, listenUri);
         TD.WriteTraceSource(14, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: A Find operation was initiated in the DiscoveryClientChannel to discover endpoint(s).
 /// Event description ID=4816, Level=Verbose, Channel=debug
 /// </summary>
 internal static void FindInitiatedInDiscoveryClientChannel()
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(15))
     {
         TD.WriteEtwEvent(15, null, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceVerboseToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("FindInitiatedInDiscoveryClientChannel", Culture));
         TD.WriteTraceSource(15, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: A {0} message with messageId='{1}' was dropped because it was a duplicate.
 /// Event description ID=4813, Level=Warning, Channel=debug
 /// </summary>
 /// <param name="eventTraceActivity">The event trace activity</param>
 /// <param name="messageType">Parameter 0 for event: A {0} message with messageId='{1}' was dropped because it was a duplicate.</param>
 /// <param name="messageId">Parameter 1 for event: A {0} message with messageId='{1}' was dropped because it was a duplicate.</param>
 internal static void DuplicateDiscoveryMessage(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string messageType, string messageId)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(12))
     {
         TD.WriteEtwEvent(12, eventTraceActivity, messageType, messageId, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceWarningToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("DuplicateDiscoveryMessage", Culture), messageType, messageId);
         TD.WriteTraceSource(12, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: A {0} message with messageId='{1}' was dropped by the DiscoveryClient because it did not have the DiscoveryMessageSequence property.
 /// Event description ID=4810, Level=Warning, Channel=debug
 /// </summary>
 /// <param name="discoveryMessageName">Parameter 0 for event: A {0} message with messageId='{1}' was dropped by the DiscoveryClient because it did not have the DiscoveryMessageSequence property.</param>
 /// <param name="messageId">Parameter 1 for event: A {0} message with messageId='{1}' was dropped by the DiscoveryClient because it did not have the DiscoveryMessageSequence property.</param>
 internal static void DiscoveryMessageWithNullMessageSequence(string discoveryMessageName, string messageId)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(9))
     {
         TD.WriteEtwEvent(9, null, discoveryMessageName, messageId, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceWarningToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("DiscoveryMessageWithNullMessageSequence", Culture), discoveryMessageName, messageId);
         TD.WriteTraceSource(9, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: A {0} message with messageId='{1}' and relatesTo='{2}' was dropped by the DiscoveryClient because either the corresponding {3} operation was completed or the relatesTo value is invalid.
 /// Event description ID=4806, Level=Warning, Channel=debug
 /// </summary>
 /// <param name="eventTraceActivity">The event trace activity</param>
 /// <param name="discoveryMessageName">Parameter 0 for event: A {0} message with messageId='{1}' and relatesTo='{2}' was dropped by the DiscoveryClient because either the corresponding {3} operation was completed or the relatesTo value is invalid.</param>
 /// <param name="messageId">Parameter 1 for event: A {0} message with messageId='{1}' and relatesTo='{2}' was dropped by the DiscoveryClient because either the corresponding {3} operation was completed or the relatesTo value is invalid.</param>
 /// <param name="relatesTo">Parameter 2 for event: A {0} message with messageId='{1}' and relatesTo='{2}' was dropped by the DiscoveryClient because either the corresponding {3} operation was completed or the relatesTo value is invalid.</param>
 /// <param name="discoveryOperationName">Parameter 3 for event: A {0} message with messageId='{1}' and relatesTo='{2}' was dropped by the DiscoveryClient because either the corresponding {3} operation was completed or the relatesTo value is invalid.</param>
 internal static void DiscoveryMessageWithInvalidRelatesToOrOperationCompleted(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string discoveryMessageName, string messageId, string relatesTo, string discoveryOperationName)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(5))
     {
         TD.WriteEtwEvent(5, eventTraceActivity, discoveryMessageName, messageId, relatesTo, discoveryOperationName, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceWarningToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("DiscoveryMessageWithInvalidRelatesToOrOperationCompleted", Culture), discoveryMessageName, messageId, relatesTo, discoveryOperationName);
         TD.WriteTraceSource(5, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: The DiscoveryClient received a multicast suppression message from a DiscoveryProxy.
 /// Event description ID=4803, Level=Informational, Channel=debug
 /// </summary>
 internal static void DiscoveryClientReceivedMulticastSuppression()
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
     if (TD.IsEtwEventEnabled(2))
     {
         TD.WriteEtwEvent(2, null, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceInformationToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("DiscoveryClientReceivedMulticastSuppression", Culture));
         TD.WriteTraceSource(2, description, payload);
     }
 }
 /// <summary>
 /// Gets trace definition like: A ProtocolException was suppressed while closing the DiscoveryClient. This could be because a DiscoveryService is still trying to send response to the DiscoveryClient.
 /// Event description ID=4802, Level=Informational, Channel=debug
 /// </summary>
 /// <param name="exception">Exception associated with the event</param>
 internal static void DiscoveryClientProtocolExceptionSuppressed(System.Exception exception)
 {
     TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, exception);
     if (TD.IsEtwEventEnabled(1))
     {
         TD.WriteEtwEvent(1, null, payload.SerializedException, payload.AppDomainFriendlyName);
     }
     if (FxTrace.ShouldTraceInformationToTraceSource)
     {
         string description = string.Format(Culture, ResourceManager.GetString("DiscoveryClientProtocolExceptionSuppressed", Culture));
         TD.WriteTraceSource(1, description, payload);
     }
 }