5
// Lluis Sanchez Gual <lluis@novell.com>
7
// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
using System.Collections.Generic;
30
namespace MonoDevelop.Projects.Dom.Parser
34
public int ClassEntries;
35
public int LoadedClasses;
36
public int ReturnTypes;
37
public int ReturnTypeParts;
38
public int ClassesWithUnsharedReturnTypes;
39
public int UnsharedReturnTypes;
40
public List<string> UnsharedReturnTypesDetail;
41
public int Parameters;
43
public int Properties;
45
public int Attributes;
47
public int InstantiatedTypes;
49
public void Add (ProjectDomStats s)
51
ClassEntries += s.ClassEntries;
52
LoadedClasses += s.LoadedClasses;
53
ReturnTypes += s.ReturnTypes;
54
ReturnTypeParts += s.ReturnTypeParts;
55
ClassesWithUnsharedReturnTypes += s.ClassesWithUnsharedReturnTypes;
56
UnsharedReturnTypes += s.UnsharedReturnTypes;
57
Parameters += s.Parameters;
59
Properties += s.Properties;
61
Attributes += s.Attributes;
63
InstantiatedTypes += s.InstantiatedTypes;
66
public void Dump (TextWriter tw, string indent)
68
tw.WriteLine (indent + "Class entries: " + ClassEntries);
69
tw.WriteLine (indent + "Loaded classes: " + LoadedClasses);
70
tw.WriteLine (indent + "Instantiated types: " + InstantiatedTypes);
71
tw.WriteLine (indent + "Return types: " + ReturnTypes);
72
tw.WriteLine (indent + "Return type parts: " + ReturnTypeParts);
73
tw.WriteLine (indent + "Classes with unshared RTs: " + ClassesWithUnsharedReturnTypes);
74
tw.WriteLine (indent + "Unshared RTs: " + UnsharedReturnTypes);
75
tw.WriteLine (indent + "Methods: " + Methods);
76
tw.WriteLine (indent + "Parameters: " + Parameters);
77
tw.WriteLine (indent + "Properties: " + Properties);
78
tw.WriteLine (indent + "Fields: " + Fields);
79
tw.WriteLine (indent + "Attributes: " + Attributes);
80
tw.WriteLine (indent + "Events: " + Events);
82
if (UnsharedReturnTypesDetail != null && UnsharedReturnTypesDetail.Count > 0) {
83
tw.WriteLine (indent + "Unshared RTs (first 10):");
84
foreach (var s in UnsharedReturnTypesDetail)
85
tw.WriteLine (indent + " " + s);