Ejemplo n.º 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);
        }
Ejemplo n.º 2
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;
		}