/// <summary> /// Tìm giá trị Assembly theo loại truyền vào, trả về dạng code C# /// Ví dụ: [assembly: AssemblyTitle("Roo.CompileAssembly")] /// </summary> /// <param name="codeCs"></param> /// <param name="v_InfoAssembly"></param> /// <returns></returns> public static string GetInfoAssemblyFromCodeReturnCs(string codeCs, v_InfoAssembly v_InfoAssembly) { var start = string.Format("[assembly: Assembly{0}(\"", v_InfoAssembly.ToString()); var end = "\")]"; var contentBetween = Compiler.GetBetweenStringsFirstForce(codeCs, start, end); if (contentBetween != "") { return(start + contentBetween + end); } return(""); }
/// <summary> /// Tìm giá trị Assembly theo loại truyền vào /// </summary> /// <param name="codeCs"></param> /// <param name="v_InfoAssembly"></param> /// <returns></returns> public static string GetInfoAssemblyFromCode(string codeCs, v_InfoAssembly v_InfoAssembly) { return(Compiler.GetBetweenStringsFirstForce(codeCs, string.Format("[assembly: Assembly{0}(\"", v_InfoAssembly.ToString()), "\")]")); }