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

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