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
- AudienceUriMode.cs
- DataColumnCollection.cs
- ClientSideQueueItem.cs
- HttpModuleAction.cs
- LinkDescriptor.cs
- DataServiceProviderWrapper.cs
- EventPropertyMap.cs
- HelloMessageApril2005.cs
- HashMembershipCondition.cs
- XmlValidatingReader.cs
- Matrix3DValueSerializer.cs
- Group.cs
- IsolatedStorageSecurityState.cs
- EngineSite.cs
- SmtpException.cs
- SchemaTableColumn.cs
- Boolean.cs
- WebBrowserProgressChangedEventHandler.cs
- NetworkInterface.cs
- BatchParser.cs
- PropertyStore.cs
- TypeListConverter.cs
- FixedSchema.cs
- ManualResetEventSlim.cs
- TemplateNameScope.cs
- CheckableControlBaseAdapter.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- UIElement.cs
- ComponentManagerBroker.cs
- LogLogRecordHeader.cs
- SqlLiftIndependentRowExpressions.cs
- ProcessProtocolHandler.cs
- OrthographicCamera.cs
- Page.cs
- ReadOnlyHierarchicalDataSource.cs
- SqlDataSourceEnumerator.cs
- MissingSatelliteAssemblyException.cs
- ExpressionsCollectionEditor.cs
- ResourceProviderFactory.cs
- LayoutInformation.cs
- PackUriHelper.cs
- ClientSettingsStore.cs
- Rijndael.cs
- SharedPersonalizationStateInfo.cs
- WindowsProgressbar.cs
- DataPointer.cs
- WindowsTitleBar.cs
- ReadOnlyObservableCollection.cs
- ExpandSegment.cs
- PrinterSettings.cs
- ContextStaticAttribute.cs
- OleDbSchemaGuid.cs
- ProviderConnectionPoint.cs
- JobInputBins.cs
- Run.cs
- RegexCompiler.cs
- Proxy.cs
- VScrollBar.cs
- WindowsToolbarItemAsMenuItem.cs
- ReflectionHelper.cs
- Select.cs
- UseAttributeSetsAction.cs
- MultiViewDesigner.cs
- SharedPersonalizationStateInfo.cs
- WinInetCache.cs
- DefaultProfileManager.cs
- CodeAssignStatement.cs
- TypeSystem.cs
- TextBoxDesigner.cs
- ListQueryResults.cs
- ResourcesGenerator.cs
- DummyDataSource.cs
- DelayLoadType.cs
- HttpModuleCollection.cs
- TreeNodeConverter.cs
- _NtlmClient.cs
- ResourceDictionary.cs
- TransformationRules.cs
- DateTimeParse.cs
- SettingsSavedEventArgs.cs
- SafePipeHandle.cs
- RadioButtonAutomationPeer.cs
- Style.cs
- WebBrowserNavigatedEventHandler.cs
- StyleSheetRefUrlEditor.cs
- Main.cs
- LightweightCodeGenerator.cs
- HtmlControlDesigner.cs
- SqlDataSourceView.cs
- WebPartCollection.cs
- Typography.cs
- RadioButtonList.cs
- AggregatePushdown.cs
- ImageButton.cs
- JsonSerializer.cs
- Camera.cs
- DataRowExtensions.cs
- StyleTypedPropertyAttribute.cs
- HttpCachePolicy.cs
- PointAnimationUsingPath.cs