-
Notifications
You must be signed in to change notification settings - Fork 1
/
UtilsTest.cs
42 lines (40 loc) · 1.28 KB
/
UtilsTest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.ComponentModel;
using NIER2014.Utils;
public class UtilsTest
{
public static void Main(string[] args)
{
GazeResults gaze_results = GazeReader.run(
new List<string> { "data/gazedata1.xml" })[0];
foreach (GazeData gaze_data in gaze_results.gazes)
{
foreach (PropertyDescriptor descriptor in TypeDescriptor.
GetProperties(gaze_data))
{
Console.Write("{0}={1}; ", descriptor.Name,
descriptor.GetValue(gaze_data));
}
Console.WriteLine("");
}
Config config = new Config();
SourceCodeEntitiesFileCollection collection = SrcMLCodeReader.run(
config.src2srcml_path, "data/java/");
foreach (SourceCodeEntitiesFile file in collection)
{
Console.WriteLine(file.FileName + ":");
foreach (SourceCodeEntity entity in file)
{
Console.Write(" - ");
foreach (PropertyDescriptor descriptor in TypeDescriptor.
GetProperties(entity))
{
Console.Write("{0}={1}; ", descriptor.Name,
descriptor.GetValue(entity));
}
Console.WriteLine("");
}
}
}
}