本文整理汇总了C#中System.Web.UI.Page.GetWaitForPreviousStepCompletionAwaitable方法的典型用法代码示例。如果您正苦于以下问题:C# Page.GetWaitForPreviousStepCompletionAwaitable方法的具体用法?C# Page.GetWaitForPreviousStepCompletionAwaitable怎么用?C# Page.GetWaitForPreviousStepCompletionAwaitable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.Page
的用法示例。
在下文中一共展示了Page.GetWaitForPreviousStepCompletionAwaitable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadRecursiveAsync
// Same as LoadRecursive, but has an async point immediately after the call to this.OnLoad.
internal async Task LoadRecursiveAsync(Page page) {
// Only make the actual call if it hasn't already happened (ASURT 111303)
if (_controlState < ControlState.Loaded) {
using (page.Context.SyncContext.AllowVoidAsyncOperationsBlock()) {
if (AdapterInternal != null) {
AdapterInternal.OnLoad(EventArgs.Empty);
}
else {
OnLoad(EventArgs.Empty);
}
await page.GetWaitForPreviousStepCompletionAwaitable();
}
}
// Call Load on all our children
if (_controls != null) {
string oldmsg = _controls.SetCollectionReadOnly(SR.Parent_collections_readonly);
int controlCount = _controls.Count;
for (int i = 0; i < controlCount; i++) {
_controls[i].LoadRecursive();
}
_controls.SetCollectionReadOnly(oldmsg);
}
if (_controlState < ControlState.Loaded)
_controlState = ControlState.Loaded;
}
示例2: PreRenderRecursiveInternalAsync
// Same as PreRenderRecursive, but has an async point after the call to this.OnPreRender.
internal async Task PreRenderRecursiveInternalAsync(Page page) {
// Call Visible property and cache value in !flags[invisible] to allow Visible to be overridden.
// This avoids unnecessary virtual property calls in SaveViewState and Render.
bool visible = Visible;
if (!visible) {
flags.Set(invisible);
}
else {
flags.Clear(invisible);
EnsureChildControls();
using (page.Context.SyncContext.AllowVoidAsyncOperationsBlock()) {
if (AdapterInternal != null) {
AdapterInternal.OnPreRender(EventArgs.Empty);
}
else {
OnPreRender(EventArgs.Empty);
}
await page.GetWaitForPreviousStepCompletionAwaitable();
}
if (_controls != null) {
string oldmsg = _controls.SetCollectionReadOnly(SR.Parent_collections_readonly);
int controlCount = _controls.Count;
for (int i = 0; i < controlCount; i++) {
_controls[i].PreRenderRecursiveInternal();
}
_controls.SetCollectionReadOnly(oldmsg);
}
}
_controlState = ControlState.PreRendered;
}
示例3: InitRecursiveAsync
// TAP version of InitRecursive
// !! IMPORTANT !!
// If you make changes to this method, also change InitRecursive.
internal async Task InitRecursiveAsync(Control namingContainer, Page page) {
ResolveAdapter();
if (_controls != null) {
if (flags[isNamingContainer]) {
namingContainer = this;
}
string oldmsg = _controls.SetCollectionReadOnly(SR.Parent_collections_readonly);
int controlCount = _controls.Count;
for (int i = 0; i < controlCount; i++) {
Control control = _controls[i];
// Propagate the page and namingContainer
control.UpdateNamingContainer(namingContainer);
if ((control._id == null) && (namingContainer != null) && !control.flags[idNotRequired]) {
control.GenerateAutomaticID();
}
control._page = Page;
control.InitRecursive(namingContainer);
}
_controls.SetCollectionReadOnly(oldmsg);
}
// Only make the actual call if it hasn't already happened (ASURT 111303)
if (_controlState < ControlState.Initialized) {
_controlState = ControlState.ChildrenInitialized; // framework also initialized
if ((Page != null) && !DesignMode) {
if (Page.ContainsTheme && EnableTheming) {
ApplySkin(Page);
}
}
using (page.Context.SyncContext.AllowVoidAsyncOperationsBlock()) {
if (AdapterInternal != null) {
AdapterInternal.OnInit(EventArgs.Empty);
}
else {
OnInit(EventArgs.Empty);
}
await page.GetWaitForPreviousStepCompletionAwaitable();
}
_controlState = ControlState.Initialized;
}
// track all subsequent state changes
TrackViewState();
#if DEBUG
ControlInvariant();
#endif
}