home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / ClsView / VisualBasicEventInfo.cs < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.1 KB  |  78 lines

  1. /*=====================================================================
  2.   File:      VisualBasicEventInfo.cs
  3.  
  4.   Summary:   Brief summary of the file contents and purpose.
  5.  
  6. ---------------------------------------------------------------------
  7.   This file is part of the Microsoft NGWS SDK Code Samples.
  8.  
  9.   Copyright (C) 2000 Microsoft Corporation.  All rights reserved.
  10.  
  11. This source code is intended only as a supplement to Microsoft
  12. Development Tools and/or on-line documentation.  See these other
  13. materials for detailed information regarding Microsoft code samples.
  14.  
  15. THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  16. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  17. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  18. PARTICULAR PURPOSE.
  19. =====================================================================*/
  20.  
  21. namespace LangUtil {
  22.    
  23. using System;
  24. using System.Reflection;
  25. using System.Collections;
  26.  
  27.    public class VisualBasicEventInfo : LangMember
  28.    {
  29.       internal String m_Name = String.Empty;
  30.       internal EventInfo m_ThisEventInfo = null;
  31.  
  32.       public VisualBasicEventInfo( EventInfo myEvent )
  33.       {
  34.          if ( myEvent == null )
  35.             throw new NullReferenceException( "The EventInfo passed to the constructor is null." );
  36.  
  37.          // Determine method name and return type       
  38.          m_Name = myEvent.Name;
  39.          m_ThisEventInfo = myEvent;
  40.       }
  41.    
  42.       public EventInfo ThisEventInfo
  43.       {
  44.          get { return m_ThisEventInfo; }
  45.       }
  46.  
  47.       public override bool IsEvent()
  48.       {
  49.          return true;
  50.       }
  51.  
  52.       public Type ThisType
  53.       {
  54.          override get 
  55.          {
  56.             return m_ThisEventInfo.ReflectedType;
  57.          }
  58.       }
  59.  
  60.       public String Name
  61.       {
  62.          override get
  63.          { 
  64.             return m_Name;
  65.          }
  66.       }
  67.  
  68.       public String Attributes
  69.       {
  70.          override get
  71.          {
  72.             throw new NotSupportedException( "Attributes is not yet implemented on this class." );
  73.          }
  74.       }
  75.    }
  76.  
  77. } // namespace LangUtil
  78.