Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / Diagnostics / ListenerTraceUtility.cs / 1 / ListenerTraceUtility.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Activation.Diagnostics { using System; using System.Diagnostics; using TraceRecord = System.ServiceModel.Diagnostics.TraceRecord; using System.ServiceModel.Diagnostics; using System.Globalization; internal static class ListenerTraceUtility { // NOTE: We need special EventLog in this class so that we can log event even if we can't initialize due to // config errors. // const string TraceSourceName = "SMSvcHost 3.0.0.0"; internal static void TraceEvent(TraceEventType severity, TraceCode traceCode, object source) { if (DiagnosticUtility.ShouldTrace(severity)) { TraceEvent(severity, traceCode, null, source, (Exception)null); } } internal static void TraceEvent(TraceEventType severity, TraceCode traceCode, object source, Exception exception) { TraceEvent(severity, traceCode, null, source, exception); } internal static void TraceEvent(TraceEventType severity, TraceCode traceCode, TraceRecord extendedData, object source, Exception exception) { if (DiagnosticUtility.ShouldTrace(severity)) { DiagnosticUtility.DiagnosticTrace.TraceEvent(severity, traceCode, Description(traceCode), extendedData, exception, Guid.Empty, source); } } static string Description(TraceCode traceCode) { // This method's validity is checked via a BVT at // diagnostics\Tracing\TraceCodeVerification string descriptionKey = "TraceCode" + DiagnosticTrace.CodeToString(traceCode); return SR.GetString(descriptionKey); } internal static EventLogger EventLog { // One doesn't hold onto the EventLogger for a long period of time. // Just long enough to log an event. #pragma warning disable 618 get { return new EventLogger(TraceSourceName, null); } #pragma warning restore 618 } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RuntimeArgumentHandle.cs
- EncryptedPackage.cs
- ErrorView.xaml.cs
- TextOutput.cs
- DoubleUtil.cs
- Underline.cs
- CreationContext.cs
- WpfKnownMember.cs
- MenuCommand.cs
- DataGridViewRowCollection.cs
- FlowDocumentReaderAutomationPeer.cs
- ActivityTrace.cs
- ObjectStateFormatter.cs
- PaperSource.cs
- InputLangChangeRequestEvent.cs
- RuntimeHelpers.cs
- OdbcParameterCollection.cs
- ThreadAbortException.cs
- MiniMapControl.xaml.cs
- Vector.cs
- WindowsListViewScroll.cs
- FileDialogCustomPlacesCollection.cs
- SystemException.cs
- EmptyImpersonationContext.cs
- BamlVersionHeader.cs
- XamlPoint3DCollectionSerializer.cs
- DirectionalLight.cs
- FixedTextPointer.cs
- WebPartMinimizeVerb.cs
- StateChangeEvent.cs
- WebControlToolBoxItem.cs
- DataGridPageChangedEventArgs.cs
- TraceXPathNavigator.cs
- COM2ComponentEditor.cs
- UnsafeNativeMethods.cs
- Select.cs
- _Semaphore.cs
- DispatcherHooks.cs
- CollectionCodeDomSerializer.cs
- TextDecorationUnitValidation.cs
- ManagedFilter.cs
- ColumnHeader.cs
- VisualBasicValue.cs
- SqlErrorCollection.cs
- WorkflowHostingResponseContext.cs
- UnsafeNativeMethodsTablet.cs
- Rijndael.cs
- ToolboxDataAttribute.cs
- InfoCardProofToken.cs
- DigitShape.cs
- ConnectionConsumerAttribute.cs
- DesignerActionVerbItem.cs
- DBDataPermissionAttribute.cs
- RangeContentEnumerator.cs
- CodeTypeConstructor.cs
- connectionpool.cs
- ImageCodecInfo.cs
- UrlAuthFailureHandler.cs
- ResourceExpressionEditor.cs
- GraphicsPathIterator.cs
- MultiAsyncResult.cs
- DllNotFoundException.cs
- DiscreteKeyFrames.cs
- GorillaCodec.cs
- MsmqInputMessage.cs
- FixedSOMTextRun.cs
- ServiceDocumentFormatter.cs
- SystemColorTracker.cs
- xdrvalidator.cs
- MarshalByRefObject.cs
- ISAPIWorkerRequest.cs
- TextTreeTextElementNode.cs
- PtsHost.cs
- HttpTransportElement.cs
- WindowsSolidBrush.cs
- SiteMapNodeItem.cs
- MsmqHostedTransportManager.cs
- MembershipSection.cs
- DependencyPropertyConverter.cs
- storepermission.cs
- WebPartDescription.cs
- XmlILAnnotation.cs
- WrappedIUnknown.cs
- RepeatBehavior.cs
- WebControl.cs
- SpellerInterop.cs
- NativeMethods.cs
- BindingContext.cs
- EncoderBestFitFallback.cs
- WebPartMinimizeVerb.cs
- SqlClientFactory.cs
- PackUriHelper.cs
- PrimarySelectionGlyph.cs
- HideDisabledControlAdapter.cs
- EditBehavior.cs
- QilIterator.cs
- HtmlForm.cs
- Psha1DerivedKeyGenerator.cs
- SecurityManager.cs
- SqlDataSourceFilteringEventArgs.cs