2
// InterfaceProperties.cs
5
// Nikhil Sarda <diff.operator@gmail.com>
7
// Copyright (c) 2009 Nikhil Sarda
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
28
using System.Collections;
29
using System.Collections.Generic;
35
using MonoDevelop.Core;
37
using MonoDevelop.Ide.Gui;
38
using MonoDevelop.Projects;
39
using MonoDevelop.Projects.Dom;
40
using MonoDevelop.Projects.Dom.Parser;
41
using MonoDevelop.Projects.Dom.Output;
42
using Mono.TextEditor;
44
using ICSharpCode.NRefactory.Ast;
45
using ICSharpCode.NRefactory.AstBuilder;
47
namespace MonoDevelop.CodeMetrics
49
public class InterfaceProperties : IProperties
53
//TODO Implement method properties for Interfaces
54
Dictionary<string, MethodProperties> Methods;
55
Dictionary<string, FieldProperties> Fields;
57
public IType Interface {
63
public string FullName {
67
public int CyclometricComplexity {
73
public int ClassCoupling {
77
public int StartLine {
85
public ulong LOCReal {
89
public ulong LOCComments {
93
public string FilePath {
97
public InterfaceProperties (IType i)
100
FullName = Interface.FullName;
101
StartLine = Interface.BodyRegion.Start.Line;
102
EndLine = Interface.BodyRegion.End.Line;