Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / InstanceDataCollection.cs / 1305376 / InstanceDataCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Diagnostics {
using System;
using System.Diagnostics;
using System.Collections;
using System.Globalization;
///
/// A collection containing all the instance data for a counter. This collection is contained in the
/// when using the
/// method.
///
public class InstanceDataCollection : DictionaryBase {
private string counterName;
///
/// [To be supplied.]
///
[Obsolete("This constructor has been deprecated. Please use System.Diagnostics.InstanceDataCollectionCollection.get_Item to get an instance of this collection instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public InstanceDataCollection(string counterName) {
if (counterName == null)
throw new ArgumentNullException("counterName");
this.counterName = counterName;
}
///
/// [To be supplied.]
///
public string CounterName {
get {
return counterName;
}
}
///
/// [To be supplied.]
///
public ICollection Keys {
get { return Dictionary.Keys; }
}
///
/// [To be supplied.]
///
public ICollection Values {
get {
return Dictionary.Values;
}
}
///
/// [To be supplied.]
///
public InstanceData this[string instanceName] {
get {
if (instanceName == null)
throw new ArgumentNullException("instanceName");
if (instanceName.Length == 0)
instanceName = PerformanceCounterLib.SingleInstanceName;
object objectName = instanceName.ToLower(CultureInfo.InvariantCulture);
return (InstanceData) Dictionary[objectName];
}
}
internal void Add(string instanceName, InstanceData value) {
object objectName = instanceName.ToLower(CultureInfo.InvariantCulture);
Dictionary.Add(objectName, value);
}
///
/// [To be supplied.]
///
public bool Contains(string instanceName) {
if (instanceName == null)
throw new ArgumentNullException("instanceName");
object objectName = instanceName.ToLower(CultureInfo.InvariantCulture);
return Dictionary.Contains(objectName);
}
///
/// [To be supplied.]
///
public void CopyTo(InstanceData[] instances, int index) {
Dictionary.Values.CopyTo((Array)instances, index);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Diagnostics {
using System;
using System.Diagnostics;
using System.Collections;
using System.Globalization;
///
/// A collection containing all the instance data for a counter. This collection is contained in the
/// when using the
/// method.
///
public class InstanceDataCollection : DictionaryBase {
private string counterName;
///
/// [To be supplied.]
///
[Obsolete("This constructor has been deprecated. Please use System.Diagnostics.InstanceDataCollectionCollection.get_Item to get an instance of this collection instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public InstanceDataCollection(string counterName) {
if (counterName == null)
throw new ArgumentNullException("counterName");
this.counterName = counterName;
}
///
/// [To be supplied.]
///
public string CounterName {
get {
return counterName;
}
}
///
/// [To be supplied.]
///
public ICollection Keys {
get { return Dictionary.Keys; }
}
///
/// [To be supplied.]
///
public ICollection Values {
get {
return Dictionary.Values;
}
}
///
/// [To be supplied.]
///
public InstanceData this[string instanceName] {
get {
if (instanceName == null)
throw new ArgumentNullException("instanceName");
if (instanceName.Length == 0)
instanceName = PerformanceCounterLib.SingleInstanceName;
object objectName = instanceName.ToLower(CultureInfo.InvariantCulture);
return (InstanceData) Dictionary[objectName];
}
}
internal void Add(string instanceName, InstanceData value) {
object objectName = instanceName.ToLower(CultureInfo.InvariantCulture);
Dictionary.Add(objectName, value);
}
///
/// [To be supplied.]
///
public bool Contains(string instanceName) {
if (instanceName == null)
throw new ArgumentNullException("instanceName");
object objectName = instanceName.ToLower(CultureInfo.InvariantCulture);
return Dictionary.Contains(objectName);
}
///
/// [To be supplied.]
///
public void CopyTo(InstanceData[] instances, int index) {
Dictionary.Values.CopyTo((Array)instances, index);
}
}
}
// 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
- Group.cs
- ReferenceService.cs
- BrushValueSerializer.cs
- ResolveRequestResponseAsyncResult.cs
- XmlSchemaChoice.cs
- TCPListener.cs
- KeyValueConfigurationElement.cs
- SqlConnectionPoolGroupProviderInfo.cs
- StreamGeometryContext.cs
- DnsEndpointIdentity.cs
- ApplyTemplatesAction.cs
- RoutingService.cs
- __ComObject.cs
- MemoryStream.cs
- SqlCaseSimplifier.cs
- LinkLabel.cs
- RequestCache.cs
- SystemIPInterfaceStatistics.cs
- COM2PropertyDescriptor.cs
- SqlFileStream.cs
- WindowsToolbar.cs
- DataBoundLiteralControl.cs
- DoubleLinkListEnumerator.cs
- SystemThemeKey.cs
- PropertyEntry.cs
- XmlSchemaSubstitutionGroup.cs
- AdjustableArrowCap.cs
- EntityKey.cs
- ChildChangedEventArgs.cs
- RangeBase.cs
- ToolStripSettings.cs
- AuthorizationPolicyTypeElementCollection.cs
- mediaeventargs.cs
- DropSource.cs
- InputLanguage.cs
- SendOperation.cs
- MethodToken.cs
- BatchServiceHost.cs
- WindowsToolbarAsMenu.cs
- ClientApiGenerator.cs
- LicenseProviderAttribute.cs
- CustomAttribute.cs
- AppSettingsSection.cs
- OrderingInfo.cs
- QilScopedVisitor.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- TableRowCollection.cs
- FrameAutomationPeer.cs
- LinkTarget.cs
- CriticalExceptions.cs
- SolidBrush.cs
- ListBase.cs
- XmlSchema.cs
- ObjectListCommandsPage.cs
- OleDbEnumerator.cs
- QuestionEventArgs.cs
- ReadOnlyObservableCollection.cs
- LostFocusEventManager.cs
- FileIOPermission.cs
- WebHttpSecurityElement.cs
- SecurityAlgorithmSuiteConverter.cs
- SystemFonts.cs
- DocumentPaginator.cs
- ReferencedAssemblyResolver.cs
- ConnectionManagementSection.cs
- X509Chain.cs
- BamlLocalizableResource.cs
- DataMemberAttribute.cs
- EnlistmentState.cs
- storepermission.cs
- Utility.cs
- RenderContext.cs
- OutputCacheSection.cs
- List.cs
- ReachSerializer.cs
- ConnectionsZone.cs
- DefaultSection.cs
- DefaultMemberAttribute.cs
- DelegatingTypeDescriptionProvider.cs
- HuffCodec.cs
- ExceptionHandlers.cs
- SystemPens.cs
- DataGridViewSelectedRowCollection.cs
- DecimalAnimationUsingKeyFrames.cs
- TabControlToolboxItem.cs
- TimeSpanValidatorAttribute.cs
- TableAdapterManagerGenerator.cs
- FastEncoderWindow.cs
- CodeCommentStatement.cs
- DescendentsWalker.cs
- ListViewDataItem.cs
- BrowserCapabilitiesFactoryBase.cs
- Clipboard.cs
- DynamicValueConverter.cs
- QueryTaskGroupState.cs
- EntityContainerRelationshipSetEnd.cs
- Hyperlink.cs
- QualifiedId.cs
- DuplicateWaitObjectException.cs
- GeneratedContractType.cs