GetPageNumberCompletedEventArgs.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 / wpf / src / Core / CSharp / System / Windows / Documents / GetPageNumberCompletedEventArgs.cs / 1305600 / GetPageNumberCompletedEventArgs.cs

                            //---------------------------------------------------------------------------- 
//
// Copyright (C) Microsoft Corporation.  All rights reserved.
//
// File: GetPageNumberCompletedEventArgs.cs 
//
// Description: GetPageNumberCompleted event. 
// 
// History:
//  08/29/2005 : [....] - created. 
//
//---------------------------------------------------------------------------

using System.ComponentModel;        // AsyncCompletedEventArgs 

namespace System.Windows.Documents 
{ 
    /// 
    /// GetPageNumberCompleted event handler. 
    /// 
    public delegate void GetPageNumberCompletedEventHandler(object sender, GetPageNumberCompletedEventArgs e);

    ///  
    /// Event arguments for the GetPageNumberCompleted event.
    ///  
    public class GetPageNumberCompletedEventArgs : AsyncCompletedEventArgs 
    {
        ///  
        /// Constructor.
        /// 
        /// The parameter passed into the GetPageNumberAsync call.
        /// The first page number on which the element appears. 
        /// Error occurred during an asynchronous operation.
        /// Whether an asynchronous operation has been cancelled. 
        /// Unique identifier for the asynchronous task. 
        public GetPageNumberCompletedEventArgs(ContentPosition contentPosition, int pageNumber, Exception error, bool cancelled, object userState)
            : 
            base(error, cancelled, userState)
        {
            _contentPosition = contentPosition;
            _pageNumber = pageNumber; 
        }
 
        ///  
        /// The parameter passed into the GetPageNumberAsync call.
        ///  
        public ContentPosition ContentPosition
        {
            get
            { 
                // Raise an exception if the operation failed or was cancelled.
                this.RaiseExceptionIfNecessary(); 
                return _contentPosition; 
            }
        } 

        /// 
        /// The first page number on which the element appears.
        ///  
        public int PageNumber
        { 
            get 
            {
                // Raise an exception if the operation failed or was cancelled. 
                this.RaiseExceptionIfNecessary();
                return _pageNumber;
            }
        } 

        ///  
        /// The parameter passed into the GetPageNumberAsync call. 
        /// 
        private readonly ContentPosition _contentPosition; 

        /// 
        /// The first page number on which the element appears.
        ///  
        private readonly int _pageNumber;
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

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