EventRecordWrittenEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / 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.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK