Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Diagnostics / PerformanceCounterTraceRecord.cs / 1 / PerformanceCounterTraceRecord.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Diagnostics
{
using System;
using System.Xml;
using System.Text;
class PerformanceCounterTraceRecord : TraceRecord
{
string categoryName;
string perfCounterName;
string instanceName;
internal PerformanceCounterTraceRecord(string perfCounterName) : this(null, perfCounterName, null)
{
}
internal PerformanceCounterTraceRecord(string categoryName, string perfCounterName) : this(categoryName, perfCounterName, null)
{
}
internal PerformanceCounterTraceRecord(string categoryName, string perfCounterName, string instanceName)
{
this.categoryName = categoryName;
this.perfCounterName = perfCounterName;
this.instanceName = instanceName;
}
internal override string EventId {get {return TraceRecord.EventIdBase + "PerformanceCounter" + TraceRecord.NamespaceSuffix; }}
internal override void WriteTo(XmlWriter writer)
{
if (!String.IsNullOrEmpty(this.categoryName))
{
writer.WriteElementString("PerformanceCategoryName", this.categoryName);
}
writer.WriteElementString("PerformanceCounterName", this.perfCounterName);
if (!String.IsNullOrEmpty(this.instanceName))
{
writer.WriteElementString("InstanceName", this.instanceName);
}
}
}
}
// 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
- ProfilePropertySettingsCollection.cs
- CatalogPartCollection.cs
- XPathSelfQuery.cs
- XmlCDATASection.cs
- WindowsGraphicsWrapper.cs
- ComponentDispatcher.cs
- WindowsGraphics2.cs
- LightweightEntityWrapper.cs
- DescendentsWalker.cs
- MessageQueueKey.cs
- ConfigurationElement.cs
- DurableInstanceContextProvider.cs
- TranslateTransform3D.cs
- BaseTemplateParser.cs
- coordinatorfactory.cs
- RegexGroup.cs
- ListMarkerLine.cs
- StackBuilderSink.cs
- MultiAsyncResult.cs
- XmlTextReader.cs
- ContentOperations.cs
- ScriptControlDescriptor.cs
- RoutedUICommand.cs
- Soap11ServerProtocol.cs
- LiteralControl.cs
- WeakReference.cs
- GridSplitter.cs
- EmptyQuery.cs
- EntityCommandExecutionException.cs
- BrowserCapabilitiesFactory35.cs
- RC2.cs
- BaseAsyncResult.cs
- WorkflowTimerService.cs
- TraceHandlerErrorFormatter.cs
- TableColumnCollection.cs
- ReadWriteObjectLock.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- StringArrayConverter.cs
- Point3DAnimation.cs
- EntityDataSourceReferenceGroup.cs
- KnownTypeHelper.cs
- Sql8ConformanceChecker.cs
- XmlDataSource.cs
- ToolStripDropTargetManager.cs
- SiteMap.cs
- AssociationSet.cs
- Visual3D.cs
- mediaclock.cs
- ActivityTypeCodeDomSerializer.cs
- DataGridViewCellFormattingEventArgs.cs
- PerformanceCounterCategory.cs
- WindowsTooltip.cs
- PathSegment.cs
- Transform3DGroup.cs
- Matrix.cs
- DiagnosticsConfiguration.cs
- CompatibleIComparer.cs
- ProgressBar.cs
- ForceCopyBuildProvider.cs
- ImageKeyConverter.cs
- FunctionDescription.cs
- StartUpEventArgs.cs
- TraceLevelHelper.cs
- COM2FontConverter.cs
- ResourceProviderFactory.cs
- TreeViewHitTestInfo.cs
- HtmlInputControl.cs
- XmlStrings.cs
- RowBinding.cs
- VirtualDirectoryMapping.cs
- QilInvoke.cs
- ResourceSet.cs
- ListControlStringCollectionEditor.cs
- FileUtil.cs
- SafeFreeMibTable.cs
- SQLMoney.cs
- DefaultWorkflowSchedulerService.cs
- SamlAssertion.cs
- Parser.cs
- ExtendedPropertyCollection.cs
- ServiceOperationParameter.cs
- DataServiceKeyAttribute.cs
- RtfControls.cs
- ConditionalExpression.cs
- LinearKeyFrames.cs
- BasicExpressionVisitor.cs
- ZoomPercentageConverter.cs
- RuntimeResourceSet.cs
- FrameworkTextComposition.cs
- AssemblyAttributesGoHere.cs
- BaseCollection.cs
- TextContainerChangeEventArgs.cs
- MatrixAnimationUsingKeyFrames.cs
- MatrixCamera.cs
- ListControlDesigner.cs
- PageEventArgs.cs
- MenuAutoFormat.cs
- IsolatedStoragePermission.cs
- WebResourceUtil.cs
- VectorKeyFrameCollection.cs