コード例 #1
0
ファイル: ProxyGenerator.cs プロジェクト: mmooney/MMDB.UITest
		private static void PopulateMasterPageObject(SourceMasterPage pageObject, CSClass classObject)
		{
			pageObject.ClassFullName = classObject.ClassFullName;
			foreach (var fieldObject in classObject.FieldList)
			{
				switch(fieldObject.TypeFullName)
				{
					case "System.Web.UI.WebControls.ContentPlaceHolder":
						pageObject.ContentHolderIDs.Add(fieldObject.FieldName);
						break;
				}
			}
			PopulateWebPageObject(pageObject, classObject);
		}
コード例 #2
0
ファイル: ProxyGenerator.cs プロジェクト: mmooney/MMDB.UITest
 private static void PopulateMasterPageObject(SourceMasterPage pageObject, CSClass classObject)
 {
     pageObject.ClassFullName = classObject.ClassFullName;
     foreach (var fieldObject in classObject.FieldList)
     {
         switch (fieldObject.TypeFullName)
         {
         case "System.Web.UI.WebControls.ContentPlaceHolder":
             pageObject.ContentHolderIDs.Add(fieldObject.FieldName);
             break;
         }
     }
     PopulateWebPageObject(pageObject, classObject);
 }
コード例 #3
0
        public SourceWebProject LoadFromProjectFile(CSProjectFile csProject, string projectFilePath)
        {
            SourceWebProject returnValue = new SourceWebProject()
            {
                RootNamespace = csProject.RootNamespace
            };
            var webPageList = csProject.WebFormContainers.Where(i => i.ContainerType == EnumWebFormContainerType.WebPage);

            foreach (var webPage in webPageList)
            {
                var csClass = csProject.ClassList.SingleOrDefault(i => i.ClassFullName == webPage.ClassFullName);
                if (csClass != null)
                {
                    SourceWebPage sourceWebPage = new SourceWebPage()
                    {
                        ClassFullName = webPage.ClassFullName,
                        PageUrl       = ConvertToUrl(webPage.FilePath, projectFilePath),
                        Controls      = LoadControls(webPage, csClass)
                    };
                    returnValue.WebPageList.Add(sourceWebPage);
                }
            }
            var masterPageList = csProject.WebFormContainers.Where(i => i.ContainerType == EnumWebFormContainerType.MasterPage);

            foreach (var masterPage in masterPageList)
            {
                SourceMasterPage sourceMasterPage = new SourceMasterPage()
                {
                    ClassFullName = masterPage.ClassFullName,
                    PageUrl       = ConvertToUrl(masterPage.FilePath, projectFilePath)
                };
                returnValue.MasterPageList.Add(sourceMasterPage);
            }
            var userControlList = csProject.WebFormContainers.Where(i => i.ContainerType == EnumWebFormContainerType.UserControl);

            foreach (var userControl in userControlList)
            {
                var csClass = csProject.ClassList.SingleOrDefault(i => i.ClassFullName == userControl.ClassFullName);
                SourceUserControl sourceUserControl = new SourceUserControl()
                {
                    ClassFullName = userControl.ClassFullName,
                    Controls      = LoadControls(userControl, csClass)
                };
                returnValue.UserControlList.Add(sourceUserControl);
            }
            return(returnValue);
        }
コード例 #4
0
		public SourceWebProject LoadFromProjectFile(CSProjectFile csProject, string projectFilePath)
		{
			SourceWebProject returnValue = new SourceWebProject()
			{
				RootNamespace = csProject.RootNamespace
			};
			var webPageList = csProject.WebFormContainers.Where(i => i.ContainerType == EnumWebFormContainerType.WebPage);
			foreach (var webPage in webPageList)
			{
				var csClass = csProject.ClassList.SingleOrDefault(i => i.ClassFullName == webPage.ClassFullName);
				if (csClass != null)
				{
					SourceWebPage sourceWebPage = new SourceWebPage()
					{
						ClassFullName = webPage.ClassFullName,
						PageUrl = ConvertToUrl(webPage.FilePath, projectFilePath),
						Controls = LoadControls(webPage, csClass)
					};
					returnValue.WebPageList.Add(sourceWebPage);
				}
			}
			var masterPageList = csProject.WebFormContainers.Where(i => i.ContainerType == EnumWebFormContainerType.MasterPage);
			foreach (var masterPage in masterPageList)
			{
				SourceMasterPage sourceMasterPage = new SourceMasterPage()
				{
					ClassFullName = masterPage.ClassFullName,
					PageUrl = ConvertToUrl(masterPage.FilePath, projectFilePath)
				};
				returnValue.MasterPageList.Add(sourceMasterPage);
			}
			var userControlList = csProject.WebFormContainers.Where(i => i.ContainerType == EnumWebFormContainerType.UserControl);
			foreach (var userControl in userControlList)
			{
				var csClass = csProject.ClassList.SingleOrDefault(i => i.ClassFullName == userControl.ClassFullName);
				SourceUserControl sourceUserControl = new SourceUserControl()
				{
					ClassFullName = userControl.ClassFullName,
					Controls = LoadControls(userControl, csClass)
				};
				returnValue.UserControlList.Add(sourceUserControl);
			}
			return returnValue;
		}