コード例 #1
0
ファイル: ErrorLog.cs プロジェクト: ywuwgij/elmah
        /// <summary>
        /// When overridden in a subclass, begins an asynchronous version
        /// of <see cref="GetErrors"/>.
        /// </summary>

        public virtual IAsyncResult BeginGetErrors(int pageIndex, int pageSize, ICollection <ErrorLogEntry> errorEntryList, AsyncCallback asyncCallback, object asyncState)
        {
            #if ASYNC
            return(GetErrorsAsync(pageIndex, pageSize, errorEntryList, CancellationToken.None).Apmize(asyncCallback, asyncState));
            #else
            return(Apm.BeginSync(asyncCallback, asyncState, this, "GetErrors", () => GetErrors(pageIndex, pageSize, errorEntryList)));
            #endif
        }
コード例 #2
0
ファイル: ErrorLog.cs プロジェクト: ywuwgij/elmah
        /// <summary>
        /// When overridden in a subclass, begins an asynchronous version
        /// of <see cref="Log"/>.
        /// </summary>

        public virtual IAsyncResult BeginLog(Error error, AsyncCallback asyncCallback, object asyncState)
        {
            #if ASYNC
            return(LogAsync(error, CancellationToken.None).Apmize(asyncCallback, asyncState));
            #else
            return(Apm.BeginSync(asyncCallback, asyncState, this, "Log", () => Log(error)));
            #endif
        }
コード例 #3
0
ファイル: ErrorLog.cs プロジェクト: ywuwgij/elmah
        /// <summary>
        /// When overridden in a subclass, begins an asynchronous version
        /// of <see cref="GetError"/>.
        /// </summary>

        public virtual IAsyncResult BeginGetError(string id, AsyncCallback asyncCallback, object asyncState)
        {
            #if ASYNC
            return(GetErrorAsync(id, CancellationToken.None).Apmize(asyncCallback, asyncState));
            #else
            return(Apm.BeginSync(asyncCallback, asyncState, this, "GetError", () => GetError(id)));
            #endif
        }