Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / Reader / EventTask.cs / 1305376 / EventTask.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: EventTask ** ** Purpose: ** This public class describes the metadata for a specific Task ** 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 Task defined by a Provider. /// An instance of this class is obtained from a ProviderMetadata object. /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class EventTask { private int value; private string name; private string displayName; private Guid guid; private bool dataReady; ProviderMetadata pmReference; object syncObject; //called from EventMetadata internal EventTask(int value, ProviderMetadata pmReference) { this.value = value; this.pmReference = pmReference; this.syncObject = new object(); } //called from ProviderMetadata internal EventTask(string name, int value, string displayName, Guid guid) { this.value = value; this.name = name; this.displayName = displayName; this.guid = guid; this.dataReady = true; this.syncObject = new object(); } internal void PrepareData() { lock (syncObject) { if (dataReady == true) return; IEnumerableresult = pmReference.Tasks; this.name = null; this.displayName = null; this.guid = Guid.Empty; this.dataReady = true; foreach (EventTask task in result) { if (task.Value == this.value) { this.name = task.Name; this.displayName = task.DisplayName; this.guid = task.EventGuid; this.dataReady = true; break; } } } } public string Name { get { PrepareData(); return this.name; } } public int Value { get { return this.value; } } public string DisplayName { get { PrepareData(); return this.displayName; } } public Guid EventGuid { get { PrepareData(); return this.guid; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Reference.cs
- BinaryExpression.cs
- CodeCatchClause.cs
- SettingsPropertyCollection.cs
- FrameworkElementFactoryMarkupObject.cs
- MetaModel.cs
- ClientBuildManager.cs
- TextLineBreak.cs
- WeakReferenceList.cs
- WorkflowApplicationException.cs
- ContentPlaceHolder.cs
- VirtualDirectoryMappingCollection.cs
- TypeDescriptorFilterService.cs
- SubqueryRules.cs
- XmlSchemaAny.cs
- CompositeTypefaceMetrics.cs
- DesignDataSource.cs
- ContentHostHelper.cs
- HotSpot.cs
- WriterOutput.cs
- HandleRef.cs
- EventMappingSettings.cs
- ModelItemKeyValuePair.cs
- IndicCharClassifier.cs
- XmlSchemaRedefine.cs
- KnownTypeDataContractResolver.cs
- PerformanceCounterCategory.cs
- MasterPage.cs
- DataGridBoolColumn.cs
- SamlAuthenticationStatement.cs
- PropertyContainer.cs
- MimeFormImporter.cs
- Padding.cs
- TrackingExtract.cs
- SrgsRuleRef.cs
- Attachment.cs
- SecurityException.cs
- SpecularMaterial.cs
- TaiwanLunisolarCalendar.cs
- XmlHierarchicalDataSourceView.cs
- APCustomTypeDescriptor.cs
- CalendarSelectionChangedEventArgs.cs
- SymmetricAlgorithm.cs
- ConnectionManagementElementCollection.cs
- AsyncMethodInvoker.cs
- PropertyGridCommands.cs
- ActivityMarkupSerializationProvider.cs
- DataListComponentEditor.cs
- ZeroOpNode.cs
- Delegate.cs
- EngineSiteSapi.cs
- LocalValueEnumerator.cs
- EntitySqlException.cs
- RuntimeHelpers.cs
- ImageCodecInfoPrivate.cs
- DataTransferEventArgs.cs
- ConfigUtil.cs
- Calendar.cs
- APCustomTypeDescriptor.cs
- ClosureBinding.cs
- BuildProviderUtils.cs
- StrokeNodeOperations.cs
- WindowHideOrCloseTracker.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- GradientStop.cs
- ViewStateModeByIdAttribute.cs
- ResourceKey.cs
- UserControl.cs
- BitmapEffectDrawingContextState.cs
- AsmxEndpointPickerExtension.cs
- WinInetCache.cs
- AsyncStreamReader.cs
- URI.cs
- Logging.cs
- DefaultValueAttribute.cs
- ProxyWebPart.cs
- ObfuscationAttribute.cs
- DesignerLinkAdapter.cs
- HttpCapabilitiesSectionHandler.cs
- ExpressionNode.cs
- TagNameToTypeMapper.cs
- XmlSerializer.cs
- FrameworkElementFactoryMarkupObject.cs
- LogWriteRestartAreaAsyncResult.cs
- Baml2006Reader.cs
- DLinqDataModelProvider.cs
- BrowserTree.cs
- TextContainer.cs
- SqlLiftWhereClauses.cs
- TypeNameConverter.cs
- XPathNodeList.cs
- odbcmetadatacolumnnames.cs
- ServiceContractViewControl.Designer.cs
- TcpClientChannel.cs
- CryptoApi.cs
- RelatedEnd.cs
- LongValidator.cs
- KeyedHashAlgorithm.cs
- RegionInfo.cs
- InvalidOperationException.cs