1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="PageAsyncTask" FullName="System.Web.UI.PageAsyncTask">
<TypeSignature Language="C#" Value="public sealed class PageAsyncTask" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>ASP.NET version 2.0 allows you to register multiple tasks to a page and run them asynchronously prior to rendering the page. You might specify that a task be run asynchronously if it is a slow process and you do not want other processes to be tied up while it is executing. The asynchronous tasks can be executed in parallel or sequentially. </para>
<para>A <see cref="T:System.Web.UI.PageAsyncTask" /> object must be registered to the page through the <see cref="M:System.Web.UI.Page.RegisterAsyncTask(System.Web.UI.PageAsyncTask)" /> method. The page itself does not have to be processed asynchronously to execute asynchronous tasks. You can set the Async attribute to either true (as shown in the following code example) or false on the page directive and the asynchronous tasks will still be processed asynchronously:</para>
<para><%@ Page Async="true" %></para>
<para>When the Async attribute is set to false, the thread that executes the page will be blocked until all asynchronous tasks are complete.</para>
<para>Any asynchronous tasks registered before the <see cref="E:System.Web.UI.Page.PreRenderComplete" /> event will be executed automatically by the page if they have not already been executed. Those asynchronous tasks registered after the <see cref="E:System.Web.UI.Page.PreRenderComplete" /> event must be executed explicitly through the <see cref="M:System.Web.UI.Page.ExecuteRegisteredAsyncTasks" /> method. The <see cref="M:System.Web.UI.Page.ExecuteRegisteredAsyncTasks" /> method can also be used to start tasks before the <see cref="E:System.Web.UI.Page.PreRenderComplete" /> event. The <see cref="M:System.Web.UI.Page.ExecuteRegisteredAsyncTasks" /> method executes all the registered asynchronous tasks on the page that have not been executed.</para>
<para>By default, an asynchronous task will time out if it has not completed within 45 seconds. You can specify a different time-out value in either the Web.config file or the page directive. The <pages> section of the Web.config file contains an asyncTimeout attribute, as shown below. </para>
<para><system.web></para>
<para> <pages asyncTimeout="30"></para>
<para> </pages></para>
<para></system.web> </para>
<para>The page directive contains an AsyncTimeout attribute.</para>
<para><%@ Page AsyncTimeout="30" %></para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Contains information about an asynchronous task registered to a page. This class cannot be inherited.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PageAsyncTask (System.Web.BeginEventHandler beginHandler, System.Web.EndEventHandler endHandler, System.Web.EndEventHandler timeoutHandler, object state);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="beginHandler" Type="System.Web.BeginEventHandler" />
<Parameter Name="endHandler" Type="System.Web.EndEventHandler" />
<Parameter Name="timeoutHandler" Type="System.Web.EndEventHandler" />
<Parameter Name="state" Type="System.Object" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This implementation of the constructor sets the <see cref="P:System.Web.UI.PageAsyncTask.ExecuteInParallel" /> property to false so the asynchronous task is not processed in parallel with other tasks on the page.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.PageAsyncTask" /> class using the default value for executing in parallel. </para>
</summary>
<param name="beginHandler">
<attribution license="cc4" from="Microsoft" modified="false" />The handler to call when beginning an asynchronous task.</param>
<param name="endHandler">
<attribution license="cc4" from="Microsoft" modified="false" />The handler to call when the task is completed successfully within the time-out period.</param>
<param name="timeoutHandler">
<attribution license="cc4" from="Microsoft" modified="false" />The handler to call when the task is not completed successfully within the time-out period.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />The object that represents the state of the task.</param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PageAsyncTask (System.Web.BeginEventHandler beginHandler, System.Web.EndEventHandler endHandler, System.Web.EndEventHandler timeoutHandler, object state, bool executeInParallel);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="beginHandler" Type="System.Web.BeginEventHandler" />
<Parameter Name="endHandler" Type="System.Web.EndEventHandler" />
<Parameter Name="timeoutHandler" Type="System.Web.EndEventHandler" />
<Parameter Name="state" Type="System.Object" />
<Parameter Name="executeInParallel" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This implementation of the constructor allows you to set whether the asynchronous task will be processed in parallel with other tasks on the page.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.PageAsyncTask" /> class using the specified value for executing in parallel. </para>
</summary>
<param name="beginHandler">
<attribution license="cc4" from="Microsoft" modified="false" />The handler to call when beginning an asynchronous task.</param>
<param name="endHandler">
<attribution license="cc4" from="Microsoft" modified="false" />The handler to call when the task is completed successfully within the time-out period.</param>
<param name="timeoutHandler">
<attribution license="cc4" from="Microsoft" modified="false" />The handler to call when the task is not completed successfully within the time-out period.</param>
<param name="state">
<attribution license="cc4" from="Microsoft" modified="false" />The object that represents the state of the task.</param>
<param name="executeInParallel">
<attribution license="cc4" from="Microsoft" modified="false" />The value that indicates whether the task can be processed in parallel with other tasks.</param>
</Docs>
</Member>
<Member MemberName="BeginHandler">
<MemberSignature Language="C#" Value="public System.Web.BeginEventHandler BeginHandler { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.BeginEventHandler</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.PageAsyncTask.BeginHandler" /> delegate is set in the constructor.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the method to call when beginning an asynchronous task.</para>
</summary>
</Docs>
</Member>
<Member MemberName="EndHandler">
<MemberSignature Language="C#" Value="public System.Web.EndEventHandler EndHandler { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.EndEventHandler</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.PageAsyncTask.EndHandler" /> delegate is set in the constructor.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the method to call when the task completes successfully within the time-out period.</para>
</summary>
</Docs>
</Member>
<Member MemberName="ExecuteInParallel">
<MemberSignature Language="C#" Value="public bool ExecuteInParallel { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.PageAsyncTask.ExecuteInParallel" /> property is set in the constructor. When multiple tasks are registered in a page and the <see cref="P:System.Web.UI.PageAsyncTask.ExecuteInParallel" /> property is set to true, then those tasks are processed concurrently. However, if the <see cref="P:System.Web.UI.PageAsyncTask.ExecuteInParallel" /> property is set to false, then those tasks are processed sequentially. For example, if a page contained two asynchronous tasks that each took 5 seconds to complete and <see cref="P:System.Web.UI.PageAsyncTask.ExecuteInParallel" /> is set to true, both tasks will complete in 5 seconds. If <see cref="P:System.Web.UI.PageAsyncTask.ExecuteInParallel" /> is set to false for these same two tasks, then the first task will complete in 5 seconds and the second task will complete 5 seconds after the completion of the first task.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value that indicates whether the task can be processed in parallel with other tasks.</para>
</summary>
</Docs>
</Member>
<Member MemberName="State">
<MemberSignature Language="C#" Value="public object State { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.PageAsyncTask.State" /> property is set in the constructor and cannot be modified during execution of the asynchronous task. You can differentiate asynchronous tasks in a page by assigning unique string values to their respective <see cref="P:System.Web.UI.PageAsyncTask.State" /> properties. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets an object that represents the state of the task.</para>
</summary>
</Docs>
</Member>
<Member MemberName="TimeoutHandler">
<MemberSignature Language="C#" Value="public System.Web.EndEventHandler TimeoutHandler { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.EndEventHandler</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.PageAsyncTask.TimeoutHandler" /> delegate is set in the constructor. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the method to call when the task does not complete successfully within the time-out period.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>
|