Logo Search packages:      
Sourcecode: ndoc version File versions  Download package

NewStuff.cs

using System;

namespace NDoc.Test.NewStuff
{
      /// <summary>
      /// This is another example of namespace summary documentation,
      /// when the UseNamespaceDocSummaries flag is set.
      /// </summary>
00009       public class NamespaceDoc {}

      /// <summary>no comment</summary>
00012       public interface IInterfaceA
      {
            /// <summary>no comment</summary>
            void InheritedImplicitInterfaceMethod();
      }
      /// <summary>no comment</summary>
00018       public interface IInterfaceB
      {
            /// <summary>no comment</summary>
            void InheritedExplicitInterfaceMethod();
      }
      /// <summary>no comment</summary>
00024       public interface IInterfaceC
      {
            /// <summary>no comment</summary>
            void ImplicitInterfaceMethod();
      }
      /// <summary>no comment</summary>
00030       public interface IInterfaceD
      {
            /// <summary>no comment</summary>
            void ExplicitInterfaceMethod();
      }
      /// <summary>no comment</summary>
00036       public interface IInterfaceE
      {
            /// <summary>no comment</summary>
            void NewInterfaceMethod();
      }
      /// <summary>no comment</summary>
00042       public interface IInterfaceF
      {
            /// <summary>no comment</summary>
            void InterfaceMethodOverride();
      }
      /// <summary>
      /// Base class used to test the new modifier. See <see cref="NewDerived"/>
      /// for details. Members in this class are named to demonstrate syntax
      /// in the derived class.
      /// </summary>
00052       public class NewBase : IInterfaceA, IInterfaceB, IInterfaceE, IInterfaceF
      {
            /// <summary>no comment</summary>
00055             public class NewClass
            {
            }
            /// <summary>no comment</summary>
            public int this[int n]
00060             {
                  get
                  {
                        return 0;
                  }
                  set
                  {
                  }
            }

            /// <summary>no comment</summary>
00071             public void NewPropertySNOKOM(int n)
            {
            }
            /// <summary>no comment</summary>
00075             public void NewVirtualPropertySNOKOM(int n)
            {
            }
            /// <summary>no comment</summary>
00079             public int NewMethodSNOKOM;
            /// <summary>no comment</summary>
00081             public int NewVirtualMethodSNOKOM;
            /// <summary>no comment</summary>
            public int NewFieldSNOKOM
00084             {
                  get { return 0; }
                  set { }
            }

            /// <summary>no comment</summary>
00090             public const int NewConst = 500;
            /// <summary>no comment</summary>
00092             public int NewField;

            /// <summary>no comment</summary>
            public int NewProperty
00096             {
                  get { return 0; }
                  set {}
            }
            /// <summary>no comment</summary>
            public virtual int OverrideProperty
00102             {
                  get { return 0; }
                  set {}
            }
            /// <summary>no comment</summary>
            public virtual int NewVirtualProperty
00108             {
                  get { return 0; }
                  set {}
            }

            /// <summary>no comment</summary>
00114             public void NewMethod(int n)
            {
            }
            /// <summary>no comment</summary>
00118             public virtual void OverrideMethod(int n)
            {
            }
            /// <summary>no comment</summary>
00122             public virtual void NewVirtualMethod(int n)
            {
            }
            /// <summary>no comment</summary>
00126             public void NewMethodWithOverload(int n)
            {
            }
            /// <summary>no comment</summary>
00130             public virtual void NewMethodWithOverload(double d)
            {
            }
            /// <summary>no comment</summary>
00134             public virtual void NewMethodWithOverload(long l)
            {
            }
            /// <summary>
            /// public void NewMethodWithOverload(short h)
            /// </summary>
            /// <param name="h"></param>
00141             public void NewMethodWithOverload(short h)
            {
            }

            /// <summary>no comment</summary>
00146             public void NewStaticMethod(int n)
            {
            }

            #region Implementation of IInterfaceA
            /// <summary>no comment</summary>
00152             public void InheritedImplicitInterfaceMethod()
            {
            
            }
            #endregion

            #region Implementation of IInterfaceB
00159             void IInterfaceB.InheritedExplicitInterfaceMethod()
            {
            
            }
            #endregion

            #region Implementation of IInterfaceE
            /// <summary>no comment</summary>
00167             public void NewInterfaceMethod()
            {
            
            }
            #endregion

            #region Implementation of IInterfaceF
            /// <summary>no comment</summary>
00175             public virtual void InterfaceMethodOverride()
            {
            
            }
            #endregion
      }

      /// <summary>
      /// This class provides new implementations for the base class members.
      /// </summary>
00185       public class NewDerived : NewBase, IInterfaceC, IInterfaceD
      {
            /// <summary>no comment</summary>
00188             new public class NewClass
            {
            }

            /// <summary>This indexer is new</summary>
            new public int this[int n]
00194             {
                  get
                  {
                        return 0;
                  }
                  set
                  {
                  }
            }
            /// <summary>This indexer is an overload</summary>
            public int this[string n]
00205             {
                  get
                  {
                        return 0;
                  }
                  set
                  {
                  }
            }

            /// <summary>no comment</summary>
00216             public const int Const = 500;
            /// <summary>no comment</summary>
00218             public new const int NewConst = 500;
            /// <summary>no comment</summary>
00220             public int Field;
            /// <summary>no comment</summary>
00222             public new int NewField;
            /// <summary>
            /// "Same Name Other Kind Of Member"
            /// </summary>
00226             public new int NewFieldSNOKOM;

            /// <summary>no comment</summary>
            public int Property
00230             {
                  get { return 0; }
                  set {}
            }
            /// <summary>no comment</summary>
            public new int NewProperty
00236             {
                  get { return 0; }
                  set {}
            }
            /// <summary>no comment</summary>
            public virtual int VirtualProperty
00242             {
                  get { return 0; }
                  set {}
            }
            /// <summary>no comment</summary>
            public override int OverrideProperty
00248             {
                  get { return 0; }
                  set {}
            }
            /// <summary>no comment</summary>
            public new virtual int NewVirtualProperty
00254             {
                  get { return 0; }
                  set {}
            }
            /// <summary>
            /// "Same Name Other Kind Of Member"
            /// </summary>
            public new int NewPropertySNOKOM
00262             {
                  get { return 0; }
                  set { }
            }
            /// <summary>
            /// "Same Name Other Kind Of Member"
            /// </summary>
            public new virtual int NewVirtualPropertySNOKOM
00270             {
                  get { return 0; }
                  set { }
            }
            /// <summary>no comment</summary>
00275             public void Method(int n)
            {
            }
            /// <summary>no comment</summary>
00279             public new void NewMethod(int n)
            {
            }
            /// <summary>no comment</summary>
00283             public virtual void VirtualMethod(int n)
            {
            }
            /// <summary>no comment</summary>
00287             public override void OverrideMethod(int n)
            {
            }
            /// <summary>no comment</summary>
00291             public new virtual void NewVirtualMethod(int n)
            {
            }
            /// <summary>
            /// "Same Name Other Kind Of Member"
            /// </summary>
00297             public new void NewMethodSNOKOM(int n)
            {
            }
            /// <summary>
            /// "Same Name Other Kind Of Member"
            /// </summary>
00303             public new virtual void NewVirtualMethodSNOKOM(int n)
            {
            }
            /// <summary>
            /// public void NewMethodWithOverload(string s)
            /// </summary>
            /// <param name="s"></param>
00310             public void NewMethodWithOverload(string s)
            {
            }
            /// <summary>
            /// new public void NewMethodWithOverload(int n)
            /// </summary>
            /// <param name="n"></param>
00317             public new void NewMethodWithOverload(int n)
            {
            }
            /// <summary>
            /// public virtual void NewMethodWithOverload(object o)
            /// </summary>
            /// <param name="o"></param>
00324             public virtual void NewMethodWithOverload(object o)
            {
            }
            /// <summary>
            /// public override void NewMethodWithOverload(double d)
            /// </summary>
            /// <param name="d"></param>
00331             public override void NewMethodWithOverload(double d)
            {
            }
            /// <summary>
            /// new public virtual void NewMethodWithOverload(long l)
            /// </summary>
            /// <param name="l"></param>
00338             public new virtual void NewMethodWithOverload(long l)
            {
            }

            /// <summary>no comment</summary>
00343             public new static void NewStaticMethod(int n)
            {
            }

            #region Implementation of IInterfaceC
            /// <summary>no comment</summary>
00349             public void ImplicitInterfaceMethod()
            {
            
            }
            #endregion

            #region Implementation of IInterfaceD
00356             void IInterfaceD.ExplicitInterfaceMethod()
            {
            
            }
            #endregion

            /// <summary>no comment</summary>
00363             public new void NewInterfaceMethod()
            {
            
            }

            /// <summary>no comment</summary>
00369             public override void InterfaceMethodOverride()
            {
            
            }
      }

      /// <summary>
      /// Do you see F?
      /// </summary>
00378       public class Base
      {
            /// <summary>no comment</summary>
00381             public static void F() {}
      }
      /// <summary>
      /// Now F is gone (private)!
      /// </summary>
00386       public class Derived: Base
      {
00388             new private static void F() {}   // Hides Base.F in Derived only
      }
      /// <summary>
      /// Where is F?
      /// </summary>
00393       public class MoreDerived: Derived
      {
      }
      /// <summary>
      /// Uses MoreDerived.F (actually Base.F)
      /// </summary>
00399       public class SomeClass
      {
            /// <summary>
            /// Works, so MoreDerived.F is there, but where?
            /// </summary>
00404             static void G() { MoreDerived.F(); }         // Invokes Base.F
      }
}

Generated by  Doxygen 1.6.0   Back to index