Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / Reader / EventLogLink.cs / 1305376 / EventLogLink.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: EventLogLink ** ** Purpose: ** This public class describes the metadata for a specific Log ** Reference 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 Log Reference defined /// by a Provider. An instance of this class is obtained from /// a ProviderMetadata object. /// [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class EventLogLink { private string channelName; private bool isImported; private string displayName; private uint channelId; private bool dataReady; ProviderMetadata pmReference; object syncObject; internal EventLogLink(uint channelId, ProviderMetadata pmReference) { this.channelId = channelId; this.pmReference = pmReference; this.syncObject = new object(); } internal EventLogLink(string channelName, bool isImported, string displayName, uint channelId) { this.channelName = channelName; this.isImported = isImported; this.displayName = displayName; this.channelId = channelId; this.dataReady = true; this.syncObject = new object(); } private void PrepareData() { if (dataReady == true) return; lock (syncObject) { if (dataReady == true) return; IEnumerableresult = pmReference.LogLinks; this.channelName = null; this.isImported = false; this.displayName = null; this.dataReady = true; foreach (EventLogLink ch in result) { if (ch.ChannelId == this.channelId) { this.channelName = ch.LogName; this.isImported = ch.IsImported; this.displayName = ch.DisplayName; this.dataReady = true; break; } } } } public string LogName { get { this.PrepareData(); return this.channelName; } } public bool IsImported { get { this.PrepareData(); return this.isImported; } } public string DisplayName { get { this.PrepareData(); return this.displayName; } } internal uint ChannelId { get { return channelId; } } } } // 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
- LateBoundChannelParameterCollection.cs
- SerializationInfo.cs
- control.ime.cs
- ZipIOLocalFileHeader.cs
- DocumentPageViewAutomationPeer.cs
- JapaneseCalendar.cs
- PathSegmentCollection.cs
- CompModSwitches.cs
- FixedBufferAttribute.cs
- HandleCollector.cs
- SafeTokenHandle.cs
- XmlDownloadManager.cs
- pingexception.cs
- BaseValidator.cs
- DataGridViewSelectedCellCollection.cs
- EventDescriptorCollection.cs
- ButtonFieldBase.cs
- PersistenceTypeAttribute.cs
- PolicyException.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ImageListDesigner.cs
- ObjectAnimationUsingKeyFrames.cs
- SlotInfo.cs
- SamlAssertionKeyIdentifierClause.cs
- BamlLocalizer.cs
- DesignSurfaceServiceContainer.cs
- ProcessInputEventArgs.cs
- EntryWrittenEventArgs.cs
- SettingsPropertyCollection.cs
- TransactionBridge.cs
- ThousandthOfEmRealDoubles.cs
- NumberFunctions.cs
- ConfigurationFileMap.cs
- PropertyCondition.cs
- __ComObject.cs
- URLMembershipCondition.cs
- SmtpTransport.cs
- MultiplexingFormatMapping.cs
- InputLanguageManager.cs
- ModelPropertyDescriptor.cs
- DataGridPageChangedEventArgs.cs
- SQLDecimal.cs
- DynamicResourceExtensionConverter.cs
- GenericWebPart.cs
- SingleStorage.cs
- XamlGridLengthSerializer.cs
- DataSourceCache.cs
- COAUTHIDENTITY.cs
- Schema.cs
- _SingleItemRequestCache.cs
- ValidationSummary.cs
- LayoutSettings.cs
- SessionParameter.cs
- ReadOnlyPropertyMetadata.cs
- ConfigurationLockCollection.cs
- UrlMappingsModule.cs
- AttachmentCollection.cs
- ConfigXmlWhitespace.cs
- ColorPalette.cs
- Int32Storage.cs
- TextElement.cs
- Decorator.cs
- FactoryGenerator.cs
- WebBaseEventKeyComparer.cs
- KeyValueConfigurationCollection.cs
- IISMapPath.cs
- TypeDescriptorFilterService.cs
- LogArchiveSnapshot.cs
- translator.cs
- DbSourceCommand.cs
- ProfileGroupSettings.cs
- DataObject.cs
- XmlDataSourceNodeDescriptor.cs
- PolyBezierSegment.cs
- Drawing.cs
- ExeContext.cs
- SettingsContext.cs
- CompilerWrapper.cs
- uribuilder.cs
- SafeBitVector32.cs
- UIElementIsland.cs
- NodeFunctions.cs
- ConnectionStringsExpressionBuilder.cs
- IdentityValidationException.cs
- TextServicesDisplayAttributePropertyRanges.cs
- RowToFieldTransformer.cs
- ObjectListItemCollection.cs
- ColorAnimationBase.cs
- HostAdapter.cs
- JsonServiceDocumentSerializer.cs
- DispatcherSynchronizationContext.cs
- GC.cs
- EntitySqlException.cs
- SHA256Managed.cs
- HtmlDocument.cs
- BitmapEffectvisualstate.cs
- DbReferenceCollection.cs
- KoreanCalendar.cs
- BindingNavigator.cs
- CultureTable.cs