Calyptus.Mvc.WebFormsViewFactory.GetMasterType C# (CSharp) Method

GetMasterType() private static method

private static GetMasterType ( Type t ) : string
t System.Type
return string
		private static string GetMasterType(Type t)
		{
			Type ofType = typeof(ViewMaster<>).MakeGenericType(t);
			string pattern = "~/Views/{0}.master";
			foreach (string path in GetPaths(t))
			{
				string vp = String.Format(pattern, path);
				if (virtualPath.FileExists(vp))
				{
					Type type = BuildManager.GetCompiledType(vp);
					if (ofType.IsAssignableFrom(type))
						return vp;
				}
			}
			return null;
		}