public static string GetSourceCode(KBObject obj) { string source = ""; if (obj is Transaction || obj is WebPanel || obj is Procedure || obj is WorkPanel) { if (ObjectsHelper.isGenerated(obj) && !ObjectsHelper.isGeneratedbyPattern(obj)) { source = ObjectsHelper.ObjectSourceUpper(obj); source = Functions.RemoveEmptyLines(source); } } return(source); }
public static void ObjStats_Comments(KBObject obj, out int linesSource, out int linesComment, out float PercentComment) { linesSource = 0; linesComment = 0; PercentComment = 0; if (obj is Transaction || obj is WebPanel || obj is Procedure || obj is WorkPanel) { if (ObjectsHelper.isGenerated(obj) && !ObjectsHelper.isGeneratedbyPattern(obj)) { string sourceWOComments = ObjectsHelper.GetSourceCodeWithoutComments(obj); string source = ObjectsHelper.GetSourceCode(obj); CountCommentsLines(source, sourceWOComments, out linesSource, out linesComment, out PercentComment); } } }