Mock EpiServer UI to PageType Wireup
using System; using EpiServerMockWebApplication.PageTypeBuilder; namespace EpiServerMockWebApplication {    namespace PageTypeBuilder    {        public interface IPageTypeBuilder        {            String Name { get; }        }        public class StartPageType : IPageTypeBuilder        {            private String name = String.Empty;            public String Name            {                get                {                    return this.name;                }                set                {                    this.name = value;                }            }        }    }    public class TemplatePage<T> : System.Web.UI.Page where T : IPageTypeBuilder    {        private T currentPage = default(T);        public T CurrentPage        {            get            {                return this.currentPage;            }            set            {                this.currentPage = value;            }        }    }    public partial class _Default : TemplatePage<StartPageType>    {        protected void Page_Load(object sender, EventArgs e)        {            String test = base.CurrentPage.Name;        }    }
Here is some code that I wrote off the top of my head. So, if we ignore the EPiServer page type builder performs automatic hydration then we can see that this is pretty close to how ordinary ASP.Net pages are hooked up to strongly typed page types.














