~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/NullReturnType.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
 
 
7
namespace ICSharpCode.SharpDevelop.Dom
 
8
{
 
9
        /// <summary>The type of the 'null'/'nothing' literal.</summary>
 
10
        public sealed class NullReturnType : AbstractReturnType
 
11
        {
 
12
                private NullReturnType() {}
 
13
                
 
14
                public static readonly NullReturnType Instance = new NullReturnType();
 
15
                
 
16
                public override bool Equals(IReturnType o)
 
17
                {
 
18
                        return o is NullReturnType;
 
19
                }
 
20
                
 
21
                public override int GetHashCode()
 
22
                {
 
23
                        return 0;
 
24
                }
 
25
                
 
26
                public override bool IsDefaultReturnType {
 
27
                        get {
 
28
                                return false;
 
29
                        }
 
30
                }
 
31
                
 
32
                public override IClass GetUnderlyingClass()     { return null; }
 
33
                public override List<IMethod>   GetMethods()    { return new List<IMethod>(); }
 
34
                public override List<IProperty> GetProperties() { return new List<IProperty>(); }
 
35
                public override List<IField>    GetFields()     { return new List<IField>(); }
 
36
                public override List<IEvent>    GetEvents()     { return new List<IEvent>(); }
 
37
        }
 
38
}