@@ -8,28 +8,44 @@ namespace Semmle.Extraction
88 /// </summary>
99 static class Tuples
1010 {
11- internal static Tuple assemblies ( Assembly assembly , File file , string identifier , string name , string version ) =>
12- new Tuple ( "assemblies" , assembly , file , identifier , name , version ) ;
13-
14- internal static Tuple containerparent ( Folder parent , IEntity child ) =>
15- new Tuple ( "containerparent" , parent , child ) ;
16-
17- internal static Tuple extractor_messages ( ExtractionMessage error , Semmle . Util . Logging . Severity severity , string origin , string errorMessage , string entityText , Location location , string stackTrace ) =>
18- new Tuple ( "extractor_messages" , error , severity , origin , errorMessage , entityText , location , stackTrace ) ;
19-
20- internal static Tuple file_extraction_mode ( File file , int mode ) =>
21- new Tuple ( "file_extraction_mode" , file , mode ) ;
22-
23- internal static Tuple files ( File file , string fullName , string name , string extension ) =>
24- new Tuple ( "files" , file , fullName , name , extension , 0 ) ;
25-
26- internal static Tuple folders ( Folder folder , string path , string name ) =>
27- new Tuple ( "folders" , folder , path , name ) ;
28-
29- internal static Tuple locations_default ( SourceLocation label , File file , int startLine , int startCol , int endLine , int endCol ) =>
30- new Tuple ( "locations_default" , label , file , startLine , startCol , endLine , endCol ) ;
31-
32- internal static Tuple numlines ( IEntity label , LineCounts lineCounts ) =>
33- new Tuple ( "numlines" , label , lineCounts . Total , lineCounts . Code , lineCounts . Comment ) ;
11+ public static void assemblies ( this TrapWriter writer , Assembly assembly , File file , string identifier , string name , string version )
12+ {
13+ writer . Writer . BeginTuple ( "assemblies" ) . Param ( assembly ) . Param ( file ) . Param ( identifier ) . Param ( name ) . Param ( version ) . EndTuple ( ) ;
14+ }
15+
16+ public static void containerparent ( this TrapWriter writer , Folder parent , IEntity child )
17+ {
18+ writer . Writer . BeginTuple ( "containerparent" ) . Param ( parent ) . Param ( child ) . EndTuple ( ) ;
19+ }
20+
21+ public static void extractor_messages ( this TrapWriter writer , ExtractionMessage error , Semmle . Util . Logging . Severity severity , string origin , string errorMessage , string entityText , Location location , string stackTrace )
22+ {
23+ writer . Writer . BeginTuple ( "extractor_messages" ) . Param ( error ) . Param ( ( int ) severity ) . Param ( origin ) . Param ( errorMessage ) . Param ( entityText ) . Param ( location ) . Param ( stackTrace ) . EndTuple ( ) ;
24+ }
25+
26+ internal static void file_extraction_mode ( this TrapWriter writer , Entities . File file , int mode )
27+ {
28+ writer . Writer . BeginTuple ( "file_extraction_mode" ) . Param ( file ) . Param ( mode ) . EndTuple ( ) ;
29+ }
30+
31+ public static void files ( this TrapWriter writer , Entities . File file , string fullName , string name , string extension )
32+ {
33+ writer . Writer . BeginTuple ( "files" ) . Param ( file ) . Param ( fullName ) . Param ( name ) . Param ( extension ) . Param ( 0 ) . EndTuple ( ) ;
34+ }
35+
36+ public static void folders ( this TrapWriter writer , Folder folder , string path , string name )
37+ {
38+ writer . Writer . BeginTuple ( "folders" ) . Param ( folder ) . Param ( path ) . Param ( name ) . EndTuple ( ) ;
39+ }
40+
41+ public static void locations_default ( this TrapWriter writer , SourceLocation label , Entities . File file , int startLine , int startCol , int endLine , int endCol )
42+ {
43+ writer . Writer . BeginTuple ( "locations_default" ) . Param ( label ) . Param ( file ) . Param ( startLine ) . Param ( startCol ) . Param ( endLine ) . Param ( endCol ) . EndTuple ( ) ;
44+ }
45+
46+ public static void numlines ( this TrapWriter writer , IEntity label , LineCounts lineCounts )
47+ {
48+ writer . Writer . BeginTuple ( "numlines" ) . Param ( label ) . Param ( lineCounts . Total ) . Param ( lineCounts . Code ) . Param ( lineCounts . Comment ) . EndTuple ( ) ;
49+ }
3450 }
3551}
0 commit comments