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
- PropertiesTab.cs
- SqlDataSourceQueryEditor.cs
- EventRouteFactory.cs
- SessionEndingCancelEventArgs.cs
- AdapterDictionary.cs
- JsonEncodingStreamWrapper.cs
- AsyncResult.cs
- ToolboxService.cs
- HostVisual.cs
- CodePrimitiveExpression.cs
- ViewCellRelation.cs
- HtmlString.cs
- LambdaCompiler.Lambda.cs
- WS2007HttpBindingElement.cs
- DisplayNameAttribute.cs
- TextElementEnumerator.cs
- FixedTextView.cs
- XmlSchemaExporter.cs
- HotCommands.cs
- SchemaMerger.cs
- FilteredAttributeCollection.cs
- ShutDownListener.cs
- DbConnectionStringCommon.cs
- DockAndAnchorLayout.cs
- Container.cs
- SqlClientFactory.cs
- ObsoleteAttribute.cs
- x509store.cs
- TargetPerspective.cs
- HostExecutionContextManager.cs
- thaishape.cs
- GridViewSelectEventArgs.cs
- DbInsertCommandTree.cs
- CodeRegionDirective.cs
- ResXBuildProvider.cs
- TimeStampChecker.cs
- ResourceDictionary.cs
- JobPageOrder.cs
- CompilationSection.cs
- CellPartitioner.cs
- CommonProperties.cs
- CollectionCodeDomSerializer.cs
- StateDesigner.Helpers.cs
- ContentHostHelper.cs
- SafeNativeMethodsCLR.cs
- SafeFileHandle.cs
- XmlSchemaAttribute.cs
- ExtensibleClassFactory.cs
- ComAdminInterfaces.cs
- CodeBinaryOperatorExpression.cs
- UnknownWrapper.cs
- RC2CryptoServiceProvider.cs
- Logging.cs
- FlowDocument.cs
- SpecularMaterial.cs
- TextDataBindingHandler.cs
- DataBoundControlHelper.cs
- MetadataItem.cs
- CaseStatement.cs
- WindowsTitleBar.cs
- SystemResourceHost.cs
- BindableAttribute.cs
- KeyFrames.cs
- Message.cs
- Convert.cs
- MetadataUtil.cs
- IImplicitResourceProvider.cs
- DocumentXPathNavigator.cs
- LicenseContext.cs
- CellTreeNodeVisitors.cs
- CacheSection.cs
- URIFormatException.cs
- RelationHandler.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- NameValuePermission.cs
- ChtmlTextWriter.cs
- FixedPageProcessor.cs
- ModelPropertyCollectionImpl.cs
- Collection.cs
- WebHeaderCollection.cs
- IncrementalReadDecoders.cs
- TransformerConfigurationWizardBase.cs
- MachineKeySection.cs
- SystemIPv6InterfaceProperties.cs
- GrammarBuilderPhrase.cs
- TextMetrics.cs
- ExternalDataExchangeClient.cs
- StringUtil.cs
- WindowHelperService.cs
- IssuedSecurityTokenParameters.cs
- QilDataSource.cs
- SqlClientWrapperSmiStream.cs
- ProgressChangedEventArgs.cs
- BinaryObjectInfo.cs
- NativeMethods.cs
- AffineTransform3D.cs
- StructuralType.cs
- PerformanceCounterLib.cs
- DataGridViewColumn.cs
- EtwProvider.cs