コード例 #1
0
        private IRequestCommand CollectNavigationCommand(MemberInfo mi)
        {
            ControllerNavigationTargetAttribute attribute = AttributeHelper.GetCustomAttribute <ControllerNavigationTargetAttribute>(mi);

            PageNavigateCommandBase result = null;

            if (attribute != null)
            {
                if (attribute.TransferType == ControllerNavigationType.Transfer)
                {
                    result = new TransferCommand(attribute.Name);
                }
                else
                {
                    result = new RedirectCommand(attribute.Name);
                }

                result.NavigateUrl = attribute.Url;

                if (ResourceUriSettings.GetConfig().Features.ContainsKey(attribute.FeatureName))
                {
                    result.Feature = ResourceUriSettings.GetConfig().Features[attribute.FeatureName].Feature;
                }
            }

            return(result);
        }
コード例 #2
0
        private string GetDefaultTargetUrl()
        {
            string url = string.Empty;

            ControllerNavigationTargetAttribute attribute = AttributeHelper.GetCustomAttribute <ControllerNavigationTargetAttribute>(this.GetType());

            if (attribute != null)
            {
                url = attribute.Url;
            }

            return(url);
        }