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
- UidManager.cs
- SqlInternalConnectionTds.cs
- _FtpControlStream.cs
- ContextMenuService.cs
- UInt32Storage.cs
- UserValidatedEventArgs.cs
- Helpers.cs
- OdbcDataReader.cs
- ClientTargetSection.cs
- FixedSOMSemanticBox.cs
- EditModeSwitchButton.cs
- _SslState.cs
- LookupNode.cs
- Bidi.cs
- LabelAutomationPeer.cs
- ObjectSecurity.cs
- ImageSourceValueSerializer.cs
- FormViewUpdatedEventArgs.cs
- MenuTracker.cs
- GlobalAclOperationRequirement.cs
- ListViewAutomationPeer.cs
- ExpressionTable.cs
- StandardBindingElement.cs
- HtmlShimManager.cs
- sqlstateclientmanager.cs
- XmlIncludeAttribute.cs
- ExpressionVisitor.cs
- HitTestWithPointDrawingContextWalker.cs
- MetafileHeaderWmf.cs
- XmlSchemaSimpleTypeUnion.cs
- DesignerActionVerbItem.cs
- NegotiationTokenAuthenticatorState.cs
- RtfFormatStack.cs
- TextRangeEditTables.cs
- Label.cs
- Point.cs
- ToolStripPanelCell.cs
- FixedSOMTableRow.cs
- RootBuilder.cs
- DatePickerDateValidationErrorEventArgs.cs
- TextProperties.cs
- BitConverter.cs
- BinaryMethodMessage.cs
- DoubleConverter.cs
- MappingMetadataHelper.cs
- hresults.cs
- MemberNameValidator.cs
- SetterBase.cs
- DocumentsTrace.cs
- SmiMetaDataProperty.cs
- GCHandleCookieTable.cs
- EncodingNLS.cs
- complextypematerializer.cs
- FixedTextBuilder.cs
- DayRenderEvent.cs
- SafeFileHandle.cs
- ColorBlend.cs
- TraceContextRecord.cs
- RegexWorker.cs
- DbConnectionPool.cs
- SHA256.cs
- ProgramPublisher.cs
- DataSpaceManager.cs
- DataGridViewCell.cs
- Semaphore.cs
- TokenFactoryCredential.cs
- SamlAction.cs
- SmiRequestExecutor.cs
- ChunkedMemoryStream.cs
- Journaling.cs
- FusionWrap.cs
- SchemaImporterExtensionElementCollection.cs
- CryptoHelper.cs
- SQLInt32.cs
- CellConstant.cs
- ItemDragEvent.cs
- MexBindingElement.cs
- UnsafeNativeMethods.cs
- EntityCommand.cs
- AnnotationAuthorChangedEventArgs.cs
- DropShadowBitmapEffect.cs
- ConfigurationValue.cs
- BaseValidator.cs
- OpenFileDialog.cs
- NamespaceEmitter.cs
- StaticResourceExtension.cs
- CapabilitiesState.cs
- TextFragmentEngine.cs
- FixUpCollection.cs
- OutputCacheSettings.cs
- UpdatePanel.cs
- XmlILConstructAnalyzer.cs
- SqlColumnizer.cs
- LinkClickEvent.cs
- MdiWindowListStrip.cs
- ImageSource.cs
- _emptywebproxy.cs
- RadioButtonStandardAdapter.cs
- Point3D.cs
- WebPartEditorCancelVerb.cs