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
- TextServicesHost.cs
- DropDownList.cs
- View.cs
- ReadOnlyDataSource.cs
- TokenBasedSet.cs
- WebPartConnectionsConnectVerb.cs
- AffineTransform3D.cs
- DoubleConverter.cs
- XsltFunctions.cs
- SectionXmlInfo.cs
- SqlGenerator.cs
- XmlArrayItemAttributes.cs
- IncrementalCompileAnalyzer.cs
- ListBoxChrome.cs
- RawAppCommandInputReport.cs
- XmlComplianceUtil.cs
- MenuItemBinding.cs
- SmiEventSink_Default.cs
- RawStylusSystemGestureInputReport.cs
- sqlnorm.cs
- XamlPoint3DCollectionSerializer.cs
- DataProviderNameConverter.cs
- WindowsFormsHelpers.cs
- XmlCollation.cs
- ObjectDataSourceMethodEventArgs.cs
- TraceProvider.cs
- SmtpLoginAuthenticationModule.cs
- PackagePartCollection.cs
- DocumentSequenceHighlightLayer.cs
- AssemblyCache.cs
- DataFormats.cs
- DataViewManager.cs
- UpdatePanelTrigger.cs
- UInt64Storage.cs
- Transform.cs
- WizardPanelChangingEventArgs.cs
- RegularExpressionValidator.cs
- AsmxEndpointPickerExtension.cs
- XmlReaderSettings.cs
- SymmetricSecurityProtocol.cs
- SHA384Managed.cs
- XmlCharType.cs
- WeakReferenceEnumerator.cs
- CommandEventArgs.cs
- SoapHeader.cs
- ItemsControl.cs
- TextRangeSerialization.cs
- SendMailErrorEventArgs.cs
- UnsafeNativeMethods.cs
- TracingConnection.cs
- MachineSettingsSection.cs
- Delegate.cs
- QueryOptionExpression.cs
- IPipelineRuntime.cs
- RSAPKCS1SignatureDeformatter.cs
- MetadataItem_Static.cs
- ScaleTransform.cs
- HttpModuleAction.cs
- CompensateDesigner.cs
- CookieParameter.cs
- PanelContainerDesigner.cs
- SiteMapDataSourceView.cs
- XmlHelper.cs
- Propagator.Evaluator.cs
- HttpInputStream.cs
- BitmapEffectInputData.cs
- ConnectionManagementElementCollection.cs
- CipherData.cs
- ListInitExpression.cs
- _SpnDictionary.cs
- InstallerTypeAttribute.cs
- CollectionViewGroup.cs
- VectorAnimation.cs
- RegisteredHiddenField.cs
- LogicalTreeHelper.cs
- PlainXmlSerializer.cs
- EditingScopeUndoUnit.cs
- LogReserveAndAppendState.cs
- MessageSecurityOverMsmqElement.cs
- EntityViewContainer.cs
- DataGridViewRow.cs
- StoryFragments.cs
- CorrelationValidator.cs
- ShaderEffect.cs
- TreeSet.cs
- LineMetrics.cs
- XPathPatternParser.cs
- HebrewCalendar.cs
- BookmarkScopeInfo.cs
- DataGridViewIntLinkedList.cs
- StructuralType.cs
- SafeBitVector32.cs
- ReturnType.cs
- XPathParser.cs
- CacheSection.cs
- FrameworkElement.cs
- MemoryStream.cs
- Calendar.cs
- GridViewCommandEventArgs.cs
- SoapFormatter.cs