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
- IApplicationTrustManager.cs
- SmtpFailedRecipientException.cs
- PassportAuthentication.cs
- MDIClient.cs
- RoleServiceManager.cs
- _SSPISessionCache.cs
- XmlILModule.cs
- OutgoingWebResponseContext.cs
- OleDbCommand.cs
- safelink.cs
- ConfigPathUtility.cs
- SqlVisitor.cs
- BitmapFrameEncode.cs
- ComplexPropertyEntry.cs
- DefaultValueMapping.cs
- PropertyGridDesigner.cs
- Logging.cs
- XsdBuildProvider.cs
- UInt16.cs
- InternalBufferOverflowException.cs
- OleDbCommandBuilder.cs
- BamlTreeMap.cs
- ScriptMethodAttribute.cs
- PerfCounterSection.cs
- BigInt.cs
- OutArgumentConverter.cs
- EntityDataSourceSelectedEventArgs.cs
- MetabaseServerConfig.cs
- FormViewRow.cs
- TagPrefixInfo.cs
- HashCodeCombiner.cs
- XmlBinaryReader.cs
- PublishLicense.cs
- ProfileService.cs
- XsdBuilder.cs
- RuntimeConfigLKG.cs
- HttpUnhandledOperationInvoker.cs
- DataGridPagingPage.cs
- FixedSOMTable.cs
- UnlockInstanceCommand.cs
- Semaphore.cs
- SizeChangedEventArgs.cs
- PermissionSetEnumerator.cs
- DataObjectPastingEventArgs.cs
- Trigger.cs
- TemplateField.cs
- SectionInformation.cs
- RemotingServices.cs
- DecimalFormatter.cs
- GC.cs
- SubMenuStyleCollection.cs
- AppModelKnownContentFactory.cs
- SimplePropertyEntry.cs
- Or.cs
- DesignTimeVisibleAttribute.cs
- MediaElementAutomationPeer.cs
- SystemDiagnosticsSection.cs
- ExceptionRoutedEventArgs.cs
- ContextBase.cs
- MultiSelectRootGridEntry.cs
- RelatedPropertyManager.cs
- FormViewPageEventArgs.cs
- WindowPattern.cs
- dataobject.cs
- BindingMAnagerBase.cs
- PrimitiveCodeDomSerializer.cs
- ResourceSet.cs
- XmlStringTable.cs
- AssemblyAttributes.cs
- TextEditorSelection.cs
- DesignBindingPicker.cs
- ProxyHelper.cs
- ClientTargetCollection.cs
- TransformGroup.cs
- TreeViewBindingsEditor.cs
- ServiceChannelManager.cs
- MimeBasePart.cs
- UpdateRecord.cs
- DataGridHelper.cs
- RichTextBox.cs
- ConfigurationManager.cs
- SRGSCompiler.cs
- NativeMethods.cs
- ResourceDisplayNameAttribute.cs
- DataSourceControlBuilder.cs
- CheckBox.cs
- RelativeSource.cs
- XmlNamespaceManager.cs
- MetadataArtifactLoaderCompositeResource.cs
- dataSvcMapFileLoader.cs
- SystemColors.cs
- UrlMappingCollection.cs
- CharStorage.cs
- TaskScheduler.cs
- PageThemeCodeDomTreeGenerator.cs
- ResourcesChangeInfo.cs
- GridViewCellAutomationPeer.cs
- DesignerAutoFormat.cs
- Vector3DCollectionValueSerializer.cs
- HexParser.cs