Esempio n. 1
0
        /// <summary>
        /// Gets the out scope.
        /// </summary>
        /// <param name="scopeRegistry">The scope registry.</param>
        /// <param name="specifiedScope">The specified scope.</param>
        /// <returns></returns>
        private IScope GetOutScope(IScopeRegistry scopeRegistry, string specifiedScope)
        {
            string scope = specifiedScope;
            if (scope == ScopeType.UnSpecified)
            {
                scope = ScopeType.Request;
            }

            return scopeRegistry[scope];
        }
Esempio n. 2
0
        /// <summary>
        /// Refreshes the UI element.
        /// </summary>
        /// <param name="scopeRegistry">The scope registry.</param>
        private void RefreshUIElement(IScopeRegistry scopeRegistry)
        {
            IScope requestScope = scopeRegistry[ScopeType.Request];

            IDictionary<UIComponent, object> uiComponentToRefresh = (IDictionary<UIComponent, object>)requestScope[UIComponent.UICOMPONENT_TO_REFRESH];

            if (uiComponentToRefresh!=null)
            {
                foreach (KeyValuePair<UIComponent, object> kvp in uiComponentToRefresh)
                {
                    kvp.Key.InjectMembers(kvp.Value, false);
                }                
            }
        }