Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / System.ServiceModel.Activation / System / ServiceModel / Activation / Diagnostics / TraceUtility.cs / 1305376 / TraceUtility.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Activation.Diagnostics { using System; using System.Diagnostics; using System.Runtime.Diagnostics; using System.Collections.Generic; using System.Globalization; static class TraceUtility { static DictionarytraceCodes = new Dictionary (7) { { TraceCode.WebHostFailedToCompile, "WebHostFailedToCompile" }, { TraceCode.WebHostServiceActivated, "WebHostServiceActivated" }, { TraceCode.WebHostFailedToActivateService, "WebHostFailedToActivateService" }, { TraceCode.WebHostCompilation, "WebHostCompilation" }, { TraceCode.WebHostDebugRequest, "WebHostDebugRequest" }, { TraceCode.WebHostProtocolMisconfigured, "WebHostProtocolMisconfigured" }, { TraceCode.WebHostServiceCloseFailed, "WebHostServiceCloseFailed" }, { TraceCode.WebHostNoCBTSupport, "WebHostNoCBTSupport" }, }; internal static void TraceEvent(TraceEventType severity, int traceCode, string traceDescription, object source) { TraceEvent(severity, traceCode, traceDescription, null, source, null); } internal static void TraceEvent(TraceEventType severity, int traceCode, string traceDescription, object source, Exception exception) { TraceEvent(severity, traceCode, traceDescription, null, source, exception); } internal static void TraceEvent(TraceEventType severity, int traceCode, string traceDescription, TraceRecord record, object source, Exception exception) { string msdnTraceCode = System.ServiceModel.Diagnostics.DiagnosticTrace.GenerateMsdnTraceCode("System.ServiceModel.Activation", traceCodes[traceCode]); DiagnosticUtility.DiagnosticTrace.TraceEvent(severity, traceCode, msdnTraceCode, traceDescription, record, exception, source); } internal static string CreateSourceString(object source) { return source.GetType().ToString() + "/" + source.GetHashCode().ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Activation.Diagnostics { using System; using System.Diagnostics; using System.Runtime.Diagnostics; using System.Collections.Generic; using System.Globalization; static class TraceUtility { static Dictionary traceCodes = new Dictionary (7) { { TraceCode.WebHostFailedToCompile, "WebHostFailedToCompile" }, { TraceCode.WebHostServiceActivated, "WebHostServiceActivated" }, { TraceCode.WebHostFailedToActivateService, "WebHostFailedToActivateService" }, { TraceCode.WebHostCompilation, "WebHostCompilation" }, { TraceCode.WebHostDebugRequest, "WebHostDebugRequest" }, { TraceCode.WebHostProtocolMisconfigured, "WebHostProtocolMisconfigured" }, { TraceCode.WebHostServiceCloseFailed, "WebHostServiceCloseFailed" }, { TraceCode.WebHostNoCBTSupport, "WebHostNoCBTSupport" }, }; internal static void TraceEvent(TraceEventType severity, int traceCode, string traceDescription, object source) { TraceEvent(severity, traceCode, traceDescription, null, source, null); } internal static void TraceEvent(TraceEventType severity, int traceCode, string traceDescription, object source, Exception exception) { TraceEvent(severity, traceCode, traceDescription, null, source, exception); } internal static void TraceEvent(TraceEventType severity, int traceCode, string traceDescription, TraceRecord record, object source, Exception exception) { string msdnTraceCode = System.ServiceModel.Diagnostics.DiagnosticTrace.GenerateMsdnTraceCode("System.ServiceModel.Activation", traceCodes[traceCode]); DiagnosticUtility.DiagnosticTrace.TraceEvent(severity, traceCode, msdnTraceCode, traceDescription, record, exception, source); } internal static string CreateSourceString(object source) { return source.GetType().ToString() + "/" + source.GetHashCode().ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Reference.cs
- RecognizedPhrase.cs
- ProcessHost.cs
- SqlCacheDependencySection.cs
- TemplateKeyConverter.cs
- FontDriver.cs
- Rect3D.cs
- DoubleLinkListEnumerator.cs
- SaveFileDialog.cs
- StreamInfo.cs
- ReadOnlyTernaryTree.cs
- DesignerImageAdapter.cs
- ScrollChrome.cs
- TaiwanLunisolarCalendar.cs
- RuleSettings.cs
- StackSpiller.Temps.cs
- DataServiceBehavior.cs
- HealthMonitoringSection.cs
- Rotation3DAnimationBase.cs
- ComplexTypeEmitter.cs
- FormsAuthenticationCredentials.cs
- WmiEventSink.cs
- Preprocessor.cs
- MatcherBuilder.cs
- ActivityExecutor.cs
- ConnectionStringSettings.cs
- MexBindingElement.cs
- HtmlInputCheckBox.cs
- XmlEncoding.cs
- GenericTextProperties.cs
- CommandHelpers.cs
- DelegatedStream.cs
- MouseCaptureWithinProperty.cs
- HandledEventArgs.cs
- ProcessModuleCollection.cs
- OleServicesContext.cs
- DateTimeFormatInfo.cs
- OptimizerPatterns.cs
- TextRange.cs
- securestring.cs
- basecomparevalidator.cs
- MonitoringDescriptionAttribute.cs
- ResXResourceWriter.cs
- DeferrableContentConverter.cs
- SqlInternalConnection.cs
- Geometry3D.cs
- ErrorHandlerModule.cs
- LabelDesigner.cs
- MouseBinding.cs
- ClientRolePrincipal.cs
- Content.cs
- UnmanagedMemoryStreamWrapper.cs
- WorkflowRuntimeServiceElementCollection.cs
- TextDecorationLocationValidation.cs
- BaseUriHelper.cs
- DictionaryBase.cs
- AbsoluteQuery.cs
- ViewGenerator.cs
- ErrorLog.cs
- _AutoWebProxyScriptWrapper.cs
- RemoteWebConfigurationHostServer.cs
- panel.cs
- RsaElement.cs
- SemanticBasicElement.cs
- SQLSingle.cs
- PathParser.cs
- UserControl.cs
- MeasureItemEvent.cs
- DependencyObjectPropertyDescriptor.cs
- VectorConverter.cs
- ConnectionStringsExpressionBuilder.cs
- Block.cs
- CalendarDateRangeChangingEventArgs.cs
- AssociationEndMember.cs
- TranslateTransform.cs
- DataReceivedEventArgs.cs
- ContractCodeDomInfo.cs
- UnitySerializationHolder.cs
- QueryTreeBuilder.cs
- QilGeneratorEnv.cs
- ResourceManager.cs
- AssemblyLoader.cs
- SqlRewriteScalarSubqueries.cs
- AlgoModule.cs
- QueryOutputWriter.cs
- RecordBuilder.cs
- Transform.cs
- QilTypeChecker.cs
- ProcessThreadCollection.cs
- MenuItemStyleCollection.cs
- StringResourceManager.cs
- EastAsianLunisolarCalendar.cs
- EpmAttributeNameBuilder.cs
- ListView.cs
- MiniAssembly.cs
- ComponentRenameEvent.cs
- OleDbCommand.cs
- DnsPermission.cs
- ContentDisposition.cs
- StylusButton.cs