Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / Eventing / Reader / EventRecordWrittenEventArgs.cs / 1305376 / EventRecordWrittenEventArgs.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: EventRecordWrittenEventArgs
**
** Purpose:
** The EventArgs class for an EventLogWatcher notification.
**
============================================================*/
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading;
using System.Security.Permissions;
using Microsoft.Win32;
namespace System.Diagnostics.Eventing.Reader {
///
/// the custom event handler args.
///
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
public sealed class EventRecordWrittenEventArgs : EventArgs {
private EventRecord record;
private Exception exception;
internal EventRecordWrittenEventArgs(EventLogRecord record) { this.record = record; }
internal EventRecordWrittenEventArgs(EventLogException exception) { this.exception = exception; }
///
/// The EventRecord being notified.
/// NOTE: If non null, then caller is required to call Dispose().
///
public EventRecord EventRecord {
get { return this.record; }
}
///
/// If any error occured during subscription, this will be non-null.
/// After a notification containing an exception, no more notifications will
/// be made for this subscription.
///
public Exception EventException {
get{ return this.exception; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: EventRecordWrittenEventArgs
**
** Purpose:
** The EventArgs class for an EventLogWatcher notification.
**
============================================================*/
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading;
using System.Security.Permissions;
using Microsoft.Win32;
namespace System.Diagnostics.Eventing.Reader {
///
/// the custom event handler args.
///
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
public sealed class EventRecordWrittenEventArgs : EventArgs {
private EventRecord record;
private Exception exception;
internal EventRecordWrittenEventArgs(EventLogRecord record) { this.record = record; }
internal EventRecordWrittenEventArgs(EventLogException exception) { this.exception = exception; }
///
/// The EventRecord being notified.
/// NOTE: If non null, then caller is required to call Dispose().
///
public EventRecord EventRecord {
get { return this.record; }
}
///
/// If any error occured during subscription, this will be non-null.
/// After a notification containing an exception, no more notifications will
/// be made for this subscription.
///
public Exception EventException {
get{ return this.exception; }
}
}
}
// 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
- CellTreeNode.cs
- ResourceReader.cs
- CodeTypeReferenceSerializer.cs
- ParallelQuery.cs
- QilSortKey.cs
- DataGridViewCellStyleChangedEventArgs.cs
- DeviceSpecificChoiceCollection.cs
- ExpressionCopier.cs
- WhitespaceRule.cs
- AuthenticationConfig.cs
- TextRange.cs
- DBConnectionString.cs
- ContractTypeNameElement.cs
- FullTextBreakpoint.cs
- TreeViewEvent.cs
- TranslateTransform3D.cs
- WindowsScrollBarBits.cs
- XmlExceptionHelper.cs
- UserControl.cs
- NullExtension.cs
- OleDbRowUpdatedEvent.cs
- DispatchChannelSink.cs
- BoolExpression.cs
- XmlILCommand.cs
- PageThemeCodeDomTreeGenerator.cs
- SerializationStore.cs
- XhtmlBasicSelectionListAdapter.cs
- FileSystemInfo.cs
- AssemblyUtil.cs
- Viewport3DAutomationPeer.cs
- Span.cs
- TdsParserHelperClasses.cs
- EncoderFallback.cs
- PickBranch.cs
- PropertyChangingEventArgs.cs
- TextServicesCompartmentContext.cs
- SocketAddress.cs
- XmlSchemaCollection.cs
- CodeNamespaceImport.cs
- PageParserFilter.cs
- PatternMatchRules.cs
- SafeNativeHandle.cs
- FormViewInsertedEventArgs.cs
- CellConstantDomain.cs
- HtmlElement.cs
- Query.cs
- TextBox.cs
- WindowsFormsHelpers.cs
- XmlWrappingWriter.cs
- XmlAnyAttributeAttribute.cs
- PointConverter.cs
- ProfilePropertyMetadata.cs
- WebPartConnectionsDisconnectVerb.cs
- _HeaderInfo.cs
- AttributeQuery.cs
- PersistenceTypeAttribute.cs
- RootBrowserWindowProxy.cs
- EmptyEnumerable.cs
- PostBackOptions.cs
- ConnectionProviderAttribute.cs
- PropertyDescriptorGridEntry.cs
- ColorConverter.cs
- ProtocolElementCollection.cs
- DesignerTransactionCloseEvent.cs
- MissingFieldException.cs
- WebPartDisplayMode.cs
- UICuesEvent.cs
- SigningCredentials.cs
- TripleDES.cs
- GridLength.cs
- TreeNodeStyle.cs
- ByteViewer.cs
- WebPartEventArgs.cs
- ComponentCache.cs
- PenContext.cs
- Int64Converter.cs
- TaskSchedulerException.cs
- RoutingChannelExtension.cs
- AlgoModule.cs
- DropDownList.cs
- OperationInfo.cs
- LinearGradientBrush.cs
- RuleSettingsCollection.cs
- SolidBrush.cs
- MethodToken.cs
- IssuedTokenClientCredential.cs
- GB18030Encoding.cs
- HtmlWindow.cs
- StylusPlugin.cs
- SqlConnectionPoolGroupProviderInfo.cs
- WindowsFormsHostAutomationPeer.cs
- ScrollableControl.cs
- TreeViewImageGenerator.cs
- TemplateControlBuildProvider.cs
- dataobject.cs
- ClientRuntimeConfig.cs
- AuthenticationServiceManager.cs
- OptionUsage.cs
- ScrollChangedEventArgs.cs
- UpdateException.cs