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
- FontFamilyIdentifier.cs
- KeyValueSerializer.cs
- XmlSerializableWriter.cs
- PrimaryKeyTypeConverter.cs
- GlyphingCache.cs
- ScrollPatternIdentifiers.cs
- ColorBuilder.cs
- RenderData.cs
- MoveSizeWinEventHandler.cs
- XmlNodeChangedEventManager.cs
- StringUtil.cs
- SelectionPattern.cs
- TextTreeInsertUndoUnit.cs
- PenContexts.cs
- XmlDocumentFieldSchema.cs
- GridEntry.cs
- SettingsPropertyIsReadOnlyException.cs
- DecimalFormatter.cs
- _AutoWebProxyScriptHelper.cs
- WebWorkflowRole.cs
- XappLauncher.cs
- LayoutManager.cs
- LinkedResourceCollection.cs
- OrderedDictionary.cs
- MatrixTransform3D.cs
- UpdateManifestForBrowserApplication.cs
- ViewEventArgs.cs
- EntitySqlException.cs
- ResourceAttributes.cs
- ToolStripSplitButton.cs
- ShutDownListener.cs
- AstTree.cs
- Int64KeyFrameCollection.cs
- XmlWriterDelegator.cs
- ImportOptions.cs
- ConfigurationSectionCollection.cs
- OleDbErrorCollection.cs
- _NetRes.cs
- SplineQuaternionKeyFrame.cs
- WorkflowDebuggerSteppingAttribute.cs
- SystemMulticastIPAddressInformation.cs
- HtmlInputPassword.cs
- ParameterElementCollection.cs
- Button.cs
- StylusCollection.cs
- Double.cs
- Screen.cs
- XmlSchemaAny.cs
- DetailsViewRowCollection.cs
- ChannelServices.cs
- NamespaceEmitter.cs
- Predicate.cs
- ModuleConfigurationInfo.cs
- TimeSpanValidatorAttribute.cs
- FaultHandlingFilter.cs
- HostingPreferredMapPath.cs
- XmlSubtreeReader.cs
- KeyEvent.cs
- invalidudtexception.cs
- ByteFacetDescriptionElement.cs
- InlineUIContainer.cs
- ParameterModifier.cs
- DataObject.cs
- ZipIOExtraFieldZip64Element.cs
- ContentPlaceHolder.cs
- MultiByteCodec.cs
- AssemblyName.cs
- ColumnBinding.cs
- EventLogTraceListener.cs
- CFStream.cs
- UnicastIPAddressInformationCollection.cs
- FormView.cs
- RunWorkerCompletedEventArgs.cs
- PackageFilter.cs
- TreeView.cs
- TransportationConfigurationTypeInstallComponent.cs
- NativeRightsManagementAPIsStructures.cs
- FileAuthorizationModule.cs
- WindowsEditBoxRange.cs
- HyperLinkStyle.cs
- UrlMappingsModule.cs
- CustomAttributeSerializer.cs
- AssemblySettingAttributes.cs
- CanonicalXml.cs
- Char.cs
- MsmqHostedTransportConfiguration.cs
- ScaleTransform.cs
- CachedFontFace.cs
- FactoryMaker.cs
- MDIWindowDialog.cs
- InputReport.cs
- _IPv6Address.cs
- TreeViewAutomationPeer.cs
- SspiNegotiationTokenAuthenticatorState.cs
- MultipleViewPattern.cs
- RequestQueryProcessor.cs
- StatusBarPanelClickEvent.cs
- TextDecorationCollection.cs
- LineServices.cs
- XmlUtil.cs