当前位置: 首页>>代码示例>>C#>>正文


C# Page.GetWaitForPreviousStepCompletionAwaitable方法代码示例

本文整理汇总了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;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:30,代码来源:Control.cs

示例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;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:34,代码来源:Control.cs

示例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
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:59,代码来源:Control.cs


注:本文中的System.Web.UI.Page.GetWaitForPreviousStepCompletionAwaitable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。