Code:
/ 4.0 / 4.0 / untmp / 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 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
- AttachedPropertyBrowsableForTypeAttribute.cs
- XmlHelper.cs
- Pts.cs
- ProcessDesigner.cs
- WinInetCache.cs
- SamlAction.cs
- SafeFileHandle.cs
- ContentTextAutomationPeer.cs
- ImportRequest.cs
- IndexedString.cs
- _LocalDataStore.cs
- UrlPropertyAttribute.cs
- PbrsForward.cs
- HitTestParameters3D.cs
- CompositeFontParser.cs
- HandlerWithFactory.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ProxyGenerationError.cs
- ManipulationLogic.cs
- KeyedCollection.cs
- DocumentOutline.cs
- ExpressionCopier.cs
- ListBase.cs
- OdbcConnectionHandle.cs
- SystemParameters.cs
- Directory.cs
- SaveFileDialog.cs
- EntryIndex.cs
- SQLDouble.cs
- Msec.cs
- AuthenticationConfig.cs
- FocusTracker.cs
- FileSystemInfo.cs
- RemotingConfiguration.cs
- UntrustedRecipientException.cs
- HostingEnvironmentWrapper.cs
- HierarchicalDataBoundControlAdapter.cs
- ArgumentNullException.cs
- TransformerConfigurationWizardBase.cs
- IconHelper.cs
- RootDesignerSerializerAttribute.cs
- FilterElement.cs
- InstanceDescriptor.cs
- DBSchemaTable.cs
- TextFormatterHost.cs
- TableCellCollection.cs
- XmlSchemaImporter.cs
- ErrorLog.cs
- RelativeSource.cs
- LoadWorkflowAsyncResult.cs
- EdmPropertyAttribute.cs
- GetResponse.cs
- DataServiceQueryProvider.cs
- EntityModelBuildProvider.cs
- MappingItemCollection.cs
- RequestCachingSection.cs
- DelegateHelpers.cs
- OleDbPermission.cs
- XmlChoiceIdentifierAttribute.cs
- GridViewSortEventArgs.cs
- ScrollableControl.cs
- RightsManagementInformation.cs
- MsdtcWrapper.cs
- MultiBindingExpression.cs
- ImmutableObjectAttribute.cs
- CompilerGlobalScopeAttribute.cs
- basevalidator.cs
- PointF.cs
- ConfigurationSectionCollection.cs
- PrintingPermission.cs
- CalendarDay.cs
- SerializerProvider.cs
- GraphicsPath.cs
- TagPrefixInfo.cs
- RoleManagerSection.cs
- DocumentPaginator.cs
- DetailsViewPageEventArgs.cs
- RuleInfoComparer.cs
- ExclusiveCanonicalizationTransform.cs
- ContextQuery.cs
- ModelService.cs
- SByteStorage.cs
- HTTPNotFoundHandler.cs
- SqlDataSource.cs
- Vector3DConverter.cs
- IPPacketInformation.cs
- hresults.cs
- SelectionList.cs
- DataGridRelationshipRow.cs
- MetadataWorkspace.cs
- QilLiteral.cs
- IteratorFilter.cs
- RawStylusInputCustomDataList.cs
- SpeakProgressEventArgs.cs
- WebPartDisplayModeCollection.cs
- TextRangeEditTables.cs
- RawStylusInputCustomDataList.cs
- PositiveTimeSpanValidator.cs
- LinqToSqlWrapper.cs
- TextUtf8RawTextWriter.cs