public override void GenerateCode(AssemblyBuilder assemblyBuilder) { if (BuildProviderUtil.RequiredBuild()) { GenerateCode(this.VirtualPath, true); } }
private static string GetCode(string virtualPath) { GenerateCode(virtualPath, false); string fileName = GetCodeFileName(virtualPath); if (File.Exists(fileName)) { return(BuildProviderUtil.ReadCode(fileName)); } //不参与解析的代码,直接输出原始代码 return(PageUtil.GetRawCode(virtualPath)); }
public static void GenerateCode(string virtualPath, bool isRemoveCache) { if (!IsIgnore(virtualPath)) { string code = PageUtil.GetRawCode(virtualPath); var info = StaticParser.Parse(virtualPath, code); if (BuildProviderUtil.SaveCode(GetCodeFileName(virtualPath), info) && isRemoveCache) { RemoveCache(); } } }