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
- QilNode.cs
- DbConnectionPoolIdentity.cs
- TableRowCollection.cs
- XmlAttributes.cs
- GuidelineSet.cs
- SimpleApplicationHost.cs
- Version.cs
- FlowDocument.cs
- CurrentTimeZone.cs
- DataPagerCommandEventArgs.cs
- Events.cs
- UrlPath.cs
- StylusButtonCollection.cs
- BaseAppDomainProtocolHandler.cs
- XmlnsDefinitionAttribute.cs
- OdbcTransaction.cs
- SubpageParaClient.cs
- FileUtil.cs
- EdmSchemaAttribute.cs
- Char.cs
- HTTPNotFoundHandler.cs
- TimeSpanOrInfiniteConverter.cs
- NameValueCollection.cs
- WrappedKeySecurityTokenParameters.cs
- CompletedAsyncResult.cs
- HashMembershipCondition.cs
- HierarchicalDataSourceControl.cs
- IIS7UserPrincipal.cs
- PathTooLongException.cs
- TransactionsSectionGroup.cs
- TcpPortSharing.cs
- MorphHelper.cs
- DataControlButton.cs
- Expander.cs
- XmlILAnnotation.cs
- HttpVersion.cs
- CaretElement.cs
- AuthenticationServiceManager.cs
- WrappedIUnknown.cs
- XPathSelfQuery.cs
- CheckBoxField.cs
- SafeRightsManagementQueryHandle.cs
- Page.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- PrintDialog.cs
- Internal.cs
- ClrPerspective.cs
- TypeConverterHelper.cs
- TextEndOfSegment.cs
- Matrix.cs
- SizeChangedEventArgs.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ChannelServices.cs
- TraceFilter.cs
- CredentialCache.cs
- ObjectManager.cs
- WindowsListView.cs
- IteratorFilter.cs
- EdmFunctionAttribute.cs
- FacetEnabledSchemaElement.cs
- XmlHierarchicalEnumerable.cs
- IIS7WorkerRequest.cs
- NamespaceEmitter.cs
- RepeatInfo.cs
- HttpSysSettings.cs
- SchemaSetCompiler.cs
- DataServiceQueryProvider.cs
- TextParentUndoUnit.cs
- _ChunkParse.cs
- HostedTcpTransportManager.cs
- SqlDataSourceEnumerator.cs
- WebBrowserEvent.cs
- ModelProperty.cs
- PageContentAsyncResult.cs
- MulticastDelegate.cs
- ColumnHeaderConverter.cs
- SingleAnimation.cs
- CheckBoxList.cs
- ApplicationProxyInternal.cs
- GradientStop.cs
- ParamArrayAttribute.cs
- KeyGestureValueSerializer.cs
- OleCmdHelper.cs
- HtmlControlPersistable.cs
- PropertyRecord.cs
- Thread.cs
- Dump.cs
- DayRenderEvent.cs
- TextFragmentEngine.cs
- Invariant.cs
- StandardTransformFactory.cs
- SessionEndingCancelEventArgs.cs
- BypassElementCollection.cs
- QilIterator.cs
- NullRuntimeConfig.cs
- ImageButton.cs
- SystemUnicastIPAddressInformation.cs
- CodeGenHelper.cs
- Message.cs
- TrackingParameters.cs