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
- ObjectResult.cs
- CacheEntry.cs
- StyleSelector.cs
- GridViewAutomationPeer.cs
- EventHandlersStore.cs
- KeySplineConverter.cs
- infer.cs
- TreeWalker.cs
- ManipulationInertiaStartingEventArgs.cs
- CanExecuteRoutedEventArgs.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ResXResourceSet.cs
- ReflectPropertyDescriptor.cs
- Parameter.cs
- CodeMemberField.cs
- SemanticBasicElement.cs
- UnsafeNativeMethods.cs
- SqlServices.cs
- MimePart.cs
- PriorityItem.cs
- TypedTableGenerator.cs
- KeyValueConfigurationCollection.cs
- XmlSchemaValidator.cs
- RootBrowserWindowProxy.cs
- MailHeaderInfo.cs
- PreservationFileReader.cs
- URLAttribute.cs
- PreApplicationStartMethodAttribute.cs
- TransformerInfo.cs
- MDIClient.cs
- ResponseBodyWriter.cs
- CurrentChangedEventManager.cs
- VectorAnimation.cs
- sitestring.cs
- SessionEndingEventArgs.cs
- CapiNative.cs
- XPathScanner.cs
- InputGestureCollection.cs
- ServiceMemoryGates.cs
- DictionaryChange.cs
- XmlSchemaAppInfo.cs
- DictionaryCustomTypeDescriptor.cs
- CodeParameterDeclarationExpression.cs
- OpenTypeLayoutCache.cs
- UserControlBuildProvider.cs
- VariableAction.cs
- DataQuery.cs
- HtmlInputFile.cs
- AnimationClock.cs
- ReferencedCollectionType.cs
- StyleSelector.cs
- FormViewPageEventArgs.cs
- ToolStripControlHost.cs
- DodSequenceMerge.cs
- KeyboardNavigation.cs
- X509RecipientCertificateClientElement.cs
- DesignerTransactionCloseEvent.cs
- EdmError.cs
- CodeNamespaceImport.cs
- ImmutableClientRuntime.cs
- PrimitiveCodeDomSerializer.cs
- ImageBrush.cs
- SymbolMethod.cs
- HttpModulesSection.cs
- ParagraphVisual.cs
- ellipse.cs
- ScrollItemProviderWrapper.cs
- RecommendedAsConfigurableAttribute.cs
- SignedXmlDebugLog.cs
- TextRangeEditTables.cs
- DesignerListAdapter.cs
- XmlElement.cs
- SortableBindingList.cs
- DebuggerAttributes.cs
- GregorianCalendarHelper.cs
- PropertyKey.cs
- XmlReflectionImporter.cs
- ConfigurationElementProperty.cs
- OracleTransaction.cs
- NumericUpDownAcceleration.cs
- X509ThumbprintKeyIdentifierClause.cs
- Lease.cs
- ExceptionUtil.cs
- RelatedCurrencyManager.cs
- RenderTargetBitmap.cs
- RenderingEventArgs.cs
- WorkflowControlClient.cs
- TextEditorLists.cs
- NativeMethods.cs
- TypeContext.cs
- FormsAuthenticationUser.cs
- XmlSchemaSimpleTypeList.cs
- FacetValues.cs
- CollectionTraceRecord.cs
- ToolboxItemFilterAttribute.cs
- Int16KeyFrameCollection.cs
- ScriptingRoleServiceSection.cs
- Operators.cs
- SecureEnvironment.cs
- MaskedTextProvider.cs