Ejemplo n.º 1
0
        public static coreModels.MenuLink ToCoreModel(this webModels.MenuLink link)
        {
            var retVal = new coreModels.MenuLink();

            retVal.InjectFrom(link);
            return(retVal);
        }
Ejemplo n.º 2
0
        public static coreModels.MenuLink ToCoreModel(this webModels.MenuLink link)
        {
            var retVal = new coreModels.MenuLink {
                Id = link.Id, Title = link.Title, Url = link.Url, Type = link.Type, Priority = link.Priority, IsActive = link.IsActive, MenuLinkListId = link.MenuLinkListId
            };

            return(retVal);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Patch changes
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void Patch(this MenuLink source, MenuLink target)
        {
            if (target == null)
                throw new ArgumentNullException("target");

            var patchInjectionPolicy = new PatchInjection<MenuLink>(x => x.IsActive, x=>x.Priority, x=>x.Title, x=>x.Url);

            target.AssociatedObjectId = source.AssociatedObjectId;
            target.AssociatedObjectName = source.AssociatedObjectName;
            target.AssociatedObjectType = source.AssociatedObjectType;

            target.InjectFrom(patchInjectionPolicy, source);
        }
        private coreModels.MenuLinkList ConvertToCoreModel(MenuLinkList list)
        {
            var retVal = new coreModels.MenuLinkList();

            retVal.InjectFrom(list);

            foreach (var link in list.MenuLinks)
            {
                var addedLink = new coreModels.MenuLink();
                addedLink.InjectFrom(link);
                retVal.MenuLinks.Add(addedLink);
            }

            return(retVal);
        }
Ejemplo n.º 5
0
        private coreModels.MenuLinkList ConvertToCoreModel(MenuLinkList list)
        {
            var retVal = new coreModels.MenuLinkList();

            retVal.InjectFrom(list);

            foreach (var link in list.MenuLinks)
            {
                var addedLink = new coreModels.MenuLink();
                addedLink.InjectFrom(link);
                retVal.MenuLinks.Add(addedLink);
            }

            return retVal;
        }
		public static coreModels.MenuLink ToCoreModel(this webModels.MenuLink link)
		{
			var retVal = new coreModels.MenuLink { Id = link.Id, Title = link.Title, Url = link.Url, Priority = link.Priority, IsActive = link.IsActive, MenuLinkListId = link.MenuLinkListId };

		    return retVal;
		}
Ejemplo n.º 7
0
		public static coreModels.MenuLink ToCoreModel(this webModels.MenuLink link)
		{
            var retVal = new coreModels.MenuLink();
            retVal.InjectFrom(link);
            return retVal;
		}