Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / Reader / EventKeyword.cs / 1305376 / EventKeyword.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: EventKeyword ** ** Purpose: ** This public class describes the metadata for a specific Keyword ** defined by a Provider. An instance of this class is obtained from ** a ProviderMetadata object. ** ============================================================*/ using System.Collections.Generic; namespace System.Diagnostics.Eventing.Reader { ////// Describes the metadata for a specific Keyword defined by a Provider. /// An instance of this class is obtained from a ProviderMetadata object. /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class EventKeyword { private long value; private string name; private string displayName; private bool dataReady; ProviderMetadata pmReference; object syncObject; //called from EventMetadata internal EventKeyword(long value, ProviderMetadata pmReference) { this.value = value; this.pmReference = pmReference; this.syncObject = new object(); } //called from ProviderMetadata internal EventKeyword(string name, long value, string displayName) { this.value = value; this.name = name; this.displayName = displayName; this.dataReady = true; this.syncObject = new object(); } internal void PrepareData() { if (dataReady == true) return; lock (syncObject) { if (dataReady == true) return; IEnumerableresult = pmReference.Keywords; this.name = null; this.displayName = null; this.dataReady = true; foreach (EventKeyword key in result) { if (key.Value == this.value) { this.name = key.Name; this.displayName = key.DisplayName; break; } } } } public string Name { get { PrepareData(); return this.name; } } public long Value { get { return this.value; } } public string DisplayName { get { PrepareData(); return this.displayName; } } } } // 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
- SingleSelectRootGridEntry.cs
- shaperfactory.cs
- ListDictionaryInternal.cs
- ClassHandlersStore.cs
- DefaultValueTypeConverter.cs
- HelpFileFileNameEditor.cs
- RequestQueryParser.cs
- PrimarySelectionAdorner.cs
- DictionaryContent.cs
- NumericUpDown.cs
- ExecutorLocksHeldException.cs
- XhtmlBasicControlAdapter.cs
- FullTextLine.cs
- ItemType.cs
- MaterialGroup.cs
- PersonalizationEntry.cs
- ReflectionTypeLoadException.cs
- DesignerProperties.cs
- DataMisalignedException.cs
- FlagsAttribute.cs
- Icon.cs
- FileSystemWatcher.cs
- HexParser.cs
- OleDbParameter.cs
- SoapSchemaMember.cs
- Size3D.cs
- BufferedReadStream.cs
- FormsAuthenticationTicket.cs
- NavigationHelper.cs
- SecureUICommand.cs
- StringAttributeCollection.cs
- Vector3DCollectionConverter.cs
- SelectionHighlightInfo.cs
- RsaKeyIdentifierClause.cs
- ToolboxSnapDragDropEventArgs.cs
- BuildResult.cs
- PagedDataSource.cs
- InboundActivityHelper.cs
- SecurityPolicySection.cs
- DecimalAnimationUsingKeyFrames.cs
- CodeTryCatchFinallyStatement.cs
- HwndProxyElementProvider.cs
- SqlColumnizer.cs
- HttpServerVarsCollection.cs
- FormViewUpdateEventArgs.cs
- ExpressionBindingCollection.cs
- SimpleWebHandlerParser.cs
- XmlQueryRuntime.cs
- ClientConfigurationSystem.cs
- Propagator.Evaluator.cs
- StateMachine.cs
- AutomationElementCollection.cs
- Certificate.cs
- TrackBarRenderer.cs
- TrackingServices.cs
- StringFunctions.cs
- EventInfo.cs
- DataGridComponentEditor.cs
- TextSelectionHighlightLayer.cs
- NativeMethods.cs
- Table.cs
- ProxyRpc.cs
- ElementHostPropertyMap.cs
- BrowserTree.cs
- PointLight.cs
- Emitter.cs
- HttpProfileBase.cs
- XmlCompatibilityReader.cs
- BulletDecorator.cs
- Misc.cs
- Verify.cs
- BinaryNode.cs
- XmlObjectSerializer.cs
- SqlProviderServices.cs
- GatewayDefinition.cs
- CollectionViewSource.cs
- RadioButton.cs
- WSMessageEncoding.cs
- Menu.cs
- MarkupCompilePass2.cs
- PageFunction.cs
- IsolatedStorageFile.cs
- Point4D.cs
- TextRunProperties.cs
- TrackingStringDictionary.cs
- ColorTranslator.cs
- NamedPipeTransportElement.cs
- RoutedEventArgs.cs
- cache.cs
- KeyNotFoundException.cs
- AstNode.cs
- TransactedReceiveData.cs
- IfAction.cs
- ClusterRegistryConfigurationProvider.cs
- DashStyle.cs
- TextSchema.cs
- ExpandSegmentCollection.cs
- D3DImage.cs
- CompiledXpathExpr.cs
- PeerInvitationResponse.cs