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

  1. <%
  2. /*=====================================================================
  3.   File:      Member.aspx
  4.  
  5.   Summary:   
  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. %>
  23.  
  24. <%@ Page Language="C#"%>
  25. <%@ Assembly Name="System.Data.dll" %>
  26. <%@ Import Namespace="System.Data.XML"%>
  27. <%@ Import Namespace="System.Data.XML.DOM"%>
  28. <%@ Import Namespace="System" %>
  29. <%@ Import Namespace="System.Reflection"%>
  30. <%@ Import Namespace="System.Collections"%>
  31. <%@ Import Namespace="System.IO"%>
  32. <%@ Import Namespace="System.Threading"     %>
  33. <%@ Import Namespace="System.Text"     %>
  34. <%@ Import Namespace="LangUtil"    %>
  35.  
  36.     
  37.         <Script runat=server>
  38.  
  39.             public String[]                            Descriptions        = null;
  40.             public Object                            TypeDetails            = null;
  41.  
  42.             public String                            MemberName            = "";
  43.             public String                            ClassName            = "";
  44.             public String                            MemberType            = "";
  45.             public String                            Description            = "";
  46.             public String                            ContentVersion        = "";
  47.             public String                            DocBuildTimestamp    = "";
  48.             public Type[]                            Hierarchy            = null;
  49.  
  50.             public Type                                ThisType            = null;
  51.             public NativeLangType                    ThisLangType        = null;
  52.             
  53.             public System.Collections.ArrayList                        MyCurrentFields            = new System.Collections.ArrayList();
  54.             public System.Collections.ArrayList                        MyCurrentEvents            = new System.Collections.ArrayList();
  55.             public System.Collections.ArrayList                        MyCurrentMethods        = new System.Collections.ArrayList();
  56.             public System.Collections.ArrayList                        MyCurrentProperties        = new System.Collections.ArrayList();
  57.             public System.Collections.ArrayList                        MyCurrentConstructors    = new System.Collections.ArrayList();
  58.             public System.Collections.ArrayList                        TheseMIs                = new System.Collections.ArrayList();
  59.             public static String                    ClassViewPath            = String.Empty;
  60.     
  61.             /*******************************************************
  62.                     
  63.                 Description GetDescriptionFromXML(Type myClass, System.Collections.ArrayList TheseMembers)
  64.  
  65.                 This method takes a Type for the class and an System.Collections.ArrayList of MemberInfos that
  66.                 represent the member Types for the name of the member requested. If ThisMember
  67.                 is null, the function returns the description for the class. If ThisMember
  68.                 is an System.Collections.ArrayList of MemberInfos, then it should return the member info of the particular
  69.                 Member description.
  70.  
  71.                     
  72.             *******************************************************/
  73.             public String GetMemberDescriptionFromXML(Type myClass, String hash){
  74.  
  75.             String Description = String.Format("<pre>This member resides in {0}</pre>", Assembly.GetAssembly(myClass).GetName());
  76.                 
  77.                 /* This method will retrieve content from an XML file. The sample does not currently contain such content.
  78.                 int last = myClass.FullName.LastIndexOf(".");
  79.                 // Only build documentation for classes inside namespaces.
  80.                 if (last != -1) {
  81.                     String myPath = GetUEPath(myClass.FullName);    
  82.                         
  83.                     if (!(File.FileExists(myPath)))
  84.                         Description = Description + "CONTENT NOT AVAILABLE.</pre>";
  85.                     else{
  86.                         XmlDocument XMLData = new XmlDocument();
  87.  
  88.                         // XmlDocuments require an XmlReader to load if you don't have a DataSet.
  89.                         // load the XmlReader for this file
  90.                         XMLData.Load(new XmlReader(myPath));
  91.  
  92.                         IDocument XMLdoc = XMLData.DomDocument;
  93.                         // to make sure there are no problems with loading files
  94.                         Monitor.Enter(XMLdoc);
  95.                         try
  96.                         {
  97.                             try 
  98.                             {
  99.                                 XMLdoc.load(myPath);
  100.                                 Description = Description 
  101.                                     + "Content Updated " 
  102.                                     + XMLdoc.documentElement.attributes.getNamedItem("timestamp").nodeValue 
  103.                                     + ".</pre>";
  104.                                 INodeList Members = XMLdoc.documentElement.getElementsByTagName("MEMBER");
  105.                                 Description = Description + GetDescriptionFromMemberID(Members, hash);
  106.                             }
  107.                             catch(Exception e)
  108.                             {
  109.                                 // if there was a parsing error.
  110.                                 Description = Description + "CONTENT NOT AVAILABLE.</pre>";
  111.                             }
  112.                          }    
  113.                          finally
  114.                          {
  115.                             Monitor.Exit(XMLdoc);
  116.                          }
  117.  
  118.                     }
  119.                 }
  120.                 */
  121.                 return Description;            
  122.             }
  123.  
  124.     /*******************************************************************************************
  125.  
  126.         GetPath takes a string and returns a string for the path to the descriptive content. 
  127.         
  128.     *******************************************************************************************/
  129.         public static String GetUEPath(String TempName){
  130.             int index;
  131.             // reinsert when you decide how this is going to work.
  132.             //String systemDrive = Runtime.GetEnvironmentVariable("SYSTEMDRIVE");
  133.             String systemDrive = "d:";
  134.             StringBuilder myPath = new StringBuilder(ClassViewPath);
  135.  
  136.             while ((index = TempName.IndexOf(".")) != -1){
  137.                 myPath.Append("\\" + TempName.Substring(0, index));
  138.                 TempName = TempName.Remove(0, index + 1);
  139.             }
  140.             
  141.             myPath.Append("\\" + TempName + ".xml");
  142.             return myPath.ToString();
  143.         }            
  144.  
  145.  
  146.     /******************************************************
  147.  
  148.         GetDescriptionFromMemberID(INodeList Members, String hash);
  149.  
  150.     ******************************************************/
  151.  
  152.     public static String GetDescriptionFromMemberID(INodeList Members, String hash){
  153.         for (int i = 0; i < Members.length; ++i) {
  154.             INode ThisMemberIDAttribute = Members.item(i).attributes.getNamedItem("memberid");
  155.             if (ThisMemberIDAttribute == null)
  156.                 return "There is an error. The MEMBERS elements must contain a memberid attribute, but this one does not:" + hash;
  157.             else if (String.Equals(ThisMemberIDAttribute.text, hash)){
  158.                 INodeList MemberElements = Members.item(i).childNodes;
  159.                 for (int j = 0; j < MemberElements.length; ++j){
  160.                     if (String.Equals(MemberElements.item(j).nodeName, "DESCRIPTION")){
  161.                         return MemberElements.item(j).text;
  162.                     }
  163.                     else
  164.                         continue;
  165.                 }
  166.             }
  167.         }
  168.         return "Cannot find a description for this member. The documentation may not <BR>describe this particular build of the assembly. The ID used to find it was " + hash;
  169.     }
  170.  
  171.  
  172.     /*************************************************
  173.         MakeClassLink takes a DataTypeDetails and a string and returns a string
  174.         that represents an HREF for a class in a particular language
  175.         and in metadata format if lang is null.
  176.  
  177.         TBD: Right now returns only native. 
  178.         
  179.         
  180.     **************************************************/
  181.  
  182.         public String MakeClassLink(NativeLangType NatLangType, bool FullName){
  183.             StringBuilder link = new StringBuilder("<A HREF=\"Browser.aspx?class=");
  184.             link.Append(NatLangType.FullClassName);
  185.             link.Append("\" Title=\"");
  186.             link.Append(NatLangType.FullClassName);
  187.             link.Append("\">");
  188.             if (FullName)
  189.                 link.Append(NatLangType.FullClassName);
  190.             else
  191.                 link.Append(NatLangType.ClassName);
  192.             link.Append("</A>"); 
  193.             
  194.             return link.ToString();
  195.             return NatLangType.FullClassName;
  196.         }
  197.  
  198.  
  199.     /**********************************************************************************************
  200.  
  201.         This function takes an System.Collections.ArrayList of either method, constructor, property, or field infos, 
  202.         along with a string for the type, and returns an array of strings containing the descriptions
  203.         in the order that the System.Collections.ArrayList was passed. Can only be called with an array of MXXinfos, 
  204.         so this function is not how Browser is built.
  205.  
  206.     ***********************************************************************************************/
  207.         public String[] GetDescriptions(Type ThisType, System.Collections.ArrayList TheseMIs, String TypeofMember) {
  208.                 String[] tempDescriptions = new String[TheseMIs.Count];
  209.                 MemberInfo tempMI = null;
  210.                 for (int i = 0; i < TheseMIs.Count; ++i){
  211.                         tempMI = (MemberInfo)TheseMIs[i];
  212.  
  213.                         tempDescriptions[i] = GetMemberDescriptionFromXML(ThisType, Util.GetHKey(tempMI));
  214.                 }
  215.                 
  216.                 return tempDescriptions;
  217.         }
  218.  
  219.  
  220.     /**********************************************************************************************
  221.  
  222.         PluralTypesGetShortNameTypeInsensitive
  223.  
  224.     ***********************************************************************************************/
  225.  
  226.     public Type PluralTypesGetShortNameTypeInsensitive(String ClassName, TextWriter OutWriter){
  227.         System.Collections.ArrayList Assemblies = new System.Collections.ArrayList();
  228.         {
  229.             Assemblies.Add(Assembly.Load("CustomMarshalers.dll"));
  230.             Assemblies.Add(Assembly.Load("iiehost.dll"));
  231.             Assemblies.Add(Assembly.Load("ISymWrapper.dll"));
  232.             Assemblies.Add(Assembly.Load("MngdIST.dll"));
  233.             Assemblies.Add(Assembly.Load("mscorlib.dll"));
  234.             Assemblies.Add(Assembly.Load("System.ASP.dll"));
  235.             Assemblies.Add(Assembly.Load("System.ASP.WebForms.Design.dll"));
  236.             Assemblies.Add(Assembly.Load("System.ASP.WebForms.DLL"));
  237.             Assemblies.Add(Assembly.Load("System.ComponentModel.Design.DLL"));
  238.             Assemblies.Add(Assembly.Load("system.config.dll"));
  239.             Assemblies.Add(Assembly.Load("system.config.objects.dll"));
  240.             Assemblies.Add(Assembly.Load("System.Configuration.Design.DLL"));
  241.             Assemblies.Add(Assembly.Load("System.Configuration.DLL"));
  242.             Assemblies.Add(Assembly.Load("System.Core.DLL"));
  243.             Assemblies.Add(Assembly.Load("System.Data.Adapter.Design.DLL"));
  244.             Assemblies.Add(Assembly.Load("System.Data.Adapter.IndexServer.Design.DLL"));
  245.             Assemblies.Add(Assembly.Load("System.Data.Design.DLL"));
  246.             Assemblies.Add(Assembly.Load("System.Data.dll"));
  247.             Assemblies.Add(Assembly.Load("System.Deprecated.DLL"));
  248.             Assemblies.Add(Assembly.Load("System.DirectoryServices.DLL"));
  249.             Assemblies.Add(Assembly.Load("system.drawing.design.dll"));
  250.             Assemblies.Add(Assembly.Load("system.drawing.dll"));
  251.             Assemblies.Add(Assembly.Load("System.Interop.DLL"));
  252.             Assemblies.Add(Assembly.Load("System.IO.DLL"));
  253.             Assemblies.Add(Assembly.Load("System.Messaging.MessageQueue.dll"));
  254.             Assemblies.Add(Assembly.Load("System.Monitoring.Design.DLL"));
  255.             Assemblies.Add(Assembly.Load("System.Monitoring.DLL"));
  256.             Assemblies.Add(Assembly.Load("System.Net.dll"));
  257.             Assemblies.Add(Assembly.Load("System.NTServices.DLL"));
  258.             Assemblies.Add(Assembly.Load("System.RegularExpressions.dll"));
  259.             Assemblies.Add(Assembly.Load("System.Serialization.Formatters.Soap.dll"));
  260.             Assemblies.Add(Assembly.Load("System.SQLTypes.dll"));
  261.             Assemblies.Add(Assembly.Load("System.Timers.Design.DLL"));
  262.             Assemblies.Add(Assembly.Load("System.Timers.DLL"));
  263.             Assemblies.Add(Assembly.Load("System.WebServices.Design.DLL"));
  264.             Assemblies.Add(Assembly.Load("System.WebServices.DLL"));
  265.             Assemblies.Add(Assembly.Load("System.WinForms.Design.DLL"));
  266.             Assemblies.Add(Assembly.Load("System.WinForms.DLL"));
  267.             Assemblies.Add(Assembly.Load("System.WinForms.Printing.Design.DLL"));
  268.             Assemblies.Add(Assembly.Load("System.xml.dll"));
  269.             Assemblies.Add(Assembly.Load("W3C.DOM.dll"));
  270.             Assemblies.Add(Assembly.Load("msvbalib.dll"));
  271.             Assemblies.Add(Assembly.Load("LangUtil.dll"));
  272.         };
  273.         Type ThisType = null;
  274.         Module ThisMod = null;
  275.         Module[] TheseModules;
  276.         bool FoundTypes = false;
  277.         int iNumFoundTypes = 0;
  278.         Type[] CurrentModTypes = null;
  279.         System.Collections.ArrayList TypeLinkStrings = new System.Collections.ArrayList();
  280.  
  281.         for (int i = 0; i < Assemblies.Count; ++i){
  282.             try{
  283.                 TheseModules = ((Assembly)Assemblies[i]).GetModules();
  284.                 if (TheseModules == null)
  285.                     continue;
  286.                 else{
  287.                         
  288.                     for (int j = 0; j < TheseModules.Length; ++j){
  289.                         CurrentModTypes = TheseModules[j].GetTypes();
  290.                         for (int iTypeCount = 0; iTypeCount < CurrentModTypes.Length; ++iTypeCount){
  291.                             if (CurrentModTypes[iTypeCount] != null 
  292.                                 && CurrentModTypes[iTypeCount].IsPublic
  293.                                 && (String.Compare(CurrentModTypes[iTypeCount].Name, ClassName, true) == 0)
  294.                             ){
  295.                                 ++iNumFoundTypes;
  296.                                 ThisType = CurrentModTypes[iTypeCount];
  297.                                 if (!FoundTypes){
  298.                                     FoundTypes = true;
  299.                                 }
  300.                                 TypeLinkStrings.Add(MakeClassLink(new NativeLangType(CurrentModTypes[iTypeCount]), true) + "<BR>");
  301.                             }
  302.                         }
  303.                     }
  304.                 }
  305.             }
  306.             catch(Exception Ex){
  307.                 continue;
  308.             }
  309.         }
  310.         if (TypeLinkStrings.Count != 1){
  311.             OutWriter.WriteLine("The following classes were found: <BR>");
  312.             for (int iLinkCount = 0; iLinkCount < TypeLinkStrings.Count; ++iLinkCount)
  313.                 OutWriter.WriteLine((String)TypeLinkStrings[iLinkCount]);
  314.         }
  315.         return ThisType;
  316.     } 
  317.  
  318.  
  319.     private Module mod = null;
  320.  
  321.     /***********************************************************************************************    
  322.  
  323.                 Use Page_Load as the main for the Web request.            
  324.  
  325.     ***********************************************************************************************/
  326.             
  327.             void Page_Load(Object sender, EventArgs EvArgs){
  328.  
  329.                 // Determine path of this application
  330.                 ClassViewPath = Request.PhysicalApplicationPath;
  331.                 ClassViewPath = ClassViewPath.Remove(ClassViewPath.LastIndexOf('\\'), 1);
  332.  
  333.                 // Obtain metainformation
  334.  
  335.                 ClassName = Request.QueryString["class"];
  336.                 MemberName = Request.QueryString["member"];
  337.                 MemberType = Request.QueryString["type"];
  338.  
  339.                 try{
  340.                     ThisType = Type.GetType(ClassName);
  341.                     if (ThisType == null) 
  342.                     throw new TypeLoadException(String.Format("Unable to load {0}.", ClassName));
  343.  
  344.                     if (MemberType == null) throw new NullReferenceException("The type parameter within the query string cannot be null.");
  345.                     if (MemberName == null) throw new NullReferenceException("The member parameter within the query string cannot be null.");
  346.                     if ( !(MemberType.Equals("method") || 
  347.                            MemberType.Equals("constructor") || 
  348.                            MemberType.Equals("property") || 
  349.                            MemberType.Equals("field") )
  350.                         ) 
  351.                         throw new ArgumentException("The value of the type parameter within the query string is invalid.");
  352.  
  353.                 }
  354.                 catch(Exception e){
  355.                     Response.Write(String.Format("<p>Unable to load {0}&member={1}&type={2}. Is the spelling and case correct?</p>", ClassName, MemberName, MemberType)); 
  356.                     ClassName = "System.Object";
  357.                     MemberName = "ToString";
  358.                     MemberType = "method";
  359.                     ThisType = Type.GetType("System.Object");
  360.                 }
  361.  
  362.                 ThisLangType = new NativeLangType(ThisType);
  363.  
  364.                 if (MemberType.Equals("constructor")){
  365.                     
  366.                     // Obtain Class Constructor Details
  367.                     for (int x=0; x < ThisLangType.OrderedConstructors.Length; x++)  {
  368.                         NativeConstructorInfo temp = new NativeConstructorInfo(ThisLangType.OrderedConstructors[x]);
  369.                         if (String.Equals((ThisLangType.OrderedConstructors[x]).Name, MemberName)){
  370.                               TheseMIs.Add(ThisLangType.OrderedConstructors[x]);
  371.                             MyCurrentConstructors.Add(temp);
  372.                         }
  373.                     }
  374.                             
  375.                     Descriptions = GetDescriptions(ThisType, TheseMIs, MemberType);
  376.                 }
  377.                 else if(MemberType.Equals("property")){        
  378.  
  379.                     // Obtain Class Property Details
  380.                     for (int x=0; x < ThisLangType.OrderedProperties.Length; x++){
  381.                         NativePropertyInfo temp = new NativePropertyInfo(ThisLangType.OrderedProperties[x]);
  382.                         if (String.Equals(temp.Name, MemberName)){
  383.                             TheseMIs.Add(ThisLangType.OrderedProperties[x]);
  384.                             MyCurrentProperties.Add(temp);
  385.                         }
  386.                     }        
  387.  
  388.                     Descriptions = GetDescriptions(ThisType, TheseMIs, MemberType);
  389.                 }
  390.                 else if(MemberType.Equals("method")){
  391.  
  392.                     // Obtain Class Method Details
  393.                     for (int x=0; x < ThisLangType.OrderedMethods.Length; x++)
  394.                     {
  395.                         NativeMethodInfo temp = new NativeMethodInfo(ThisLangType.OrderedMethods[x]);
  396.                         // if names match, add to overloaded System.Collections.ArrayList.
  397.                         if (MemberName.Equals(temp.Name)){
  398.                             TheseMIs.Add(ThisLangType.OrderedMethods[x]);
  399.                             MyCurrentMethods.Add(temp);
  400.                         }
  401.                     }
  402.  
  403.                     Descriptions = GetDescriptions(ThisType, TheseMIs, MemberType);
  404.                 }
  405.                 else if (MemberType.Equals("field")){
  406.                    // Obtain Class Field Details
  407.                     for (int x=0; x < ThisLangType.OrderedFields.Length; x++){
  408.                         NativeFieldInfo temp = new NativeFieldInfo(ThisLangType.OrderedFields[x]);
  409.  
  410.                             // if names match, add to overloaded System.Collections.ArrayList.
  411.                             if (String.Equals(temp.Name, MemberName)){
  412.                                 TheseMIs.Add(ThisLangType.OrderedFields[x]);
  413.                                 MyCurrentFields.Add(temp);
  414.                             }
  415.                     }
  416.                     Descriptions = GetDescriptions(ThisType, TheseMIs, MemberType);
  417.                 }
  418.                 else {
  419.                    // Obtain Class Events Details
  420.                     for (int x=0; x < ThisLangType.OrderedEvents.Length; x++){
  421.                         NativeEventInfo temp = new NativeEventInfo(ThisLangType.OrderedEvents[x]);
  422.  
  423.                             // if names match, add to overloaded System.Collections.ArrayList.
  424.                             if (String.Equals(temp.Name, MemberName)){
  425.                                 TheseMIs.Add(ThisLangType.OrderedEvents[x]);
  426.                                 MyCurrentEvents.Add(temp);
  427.                             }
  428.                     }
  429.                     Descriptions = GetDescriptions(ThisType, TheseMIs, MemberType);
  430.                 }
  431.  
  432.  
  433.             } //END OF Load
  434.  
  435.         </Script>
  436. <HTML>
  437.     <HEAD>
  438.         <style type="text/css">
  439.          @import url(backSDK4.css);
  440.         </style>
  441.         <Title>ClassView: Microsoft NGWS SDK version <%=String.Empty%></Title>
  442.  
  443.    </HEAD>
  444.  
  445.    <Body>
  446.     
  447.     
  448.             <H2><A Title="<%=ThisType.FullName%>" HREF="Browser.aspx?class=<%=ThisType.FullName%>"><%=ThisType.FullName%></A>.<% if (String.Equals(MemberName, ".ctor")) {Response.Write(ThisType.Name);} else Response.Write(MemberName);
  449.                 Response.Write(" " + MemberType);%></H2> 
  450.  
  451.             <%=Description%>
  452.             
  453.             
  454. <!-- START OF REF PAGE METADATA -->
  455.     
  456.         <%  if (MemberType.Equals("constructor")) {
  457.             for (int i = 0; i < MyCurrentConstructors.Count; ++i) { %>
  458.             <%    NativeConstructorInfo temp = (NativeConstructorInfo)MyCurrentConstructors[i]; %>
  459.             
  460.                 <%=temp.VisualBasicLangObject.HTMLDeclaration%>
  461.                 <%=temp.MCLangObject.HTMLDeclaration%>
  462.                 <%=temp.CSharpLangObject.HTMLDeclaration%>
  463.                 
  464.                 <HR style="color:blue">
  465.             <% } %>
  466.         <% } // end constructor loop 
  467.     
  468.  
  469.         else if (String.Equals(MemberType, "method")){
  470.             for (int i = 0; i < MyCurrentMethods.Count; ++i) { %>
  471.             <%    NativeMethodInfo temp = (NativeMethodInfo)MyCurrentMethods[i]; %>
  472.                 
  473.                 <% if (i == 0) { ; } %>
  474.                 <%=temp.VisualBasicLangObject.HTMLDeclaration%>
  475.                 <%=temp.MCLangObject.HTMLDeclaration%>
  476.                 <%=temp.CSharpLangObject.HTMLDeclaration%>
  477.  
  478.                 <HR style="color:blue">
  479.             <% } %>
  480.             
  481.         <% } 
  482.         
  483.         
  484.         else if (String.Equals(MemberType, "property")){
  485.             for (int i = 0; i < MyCurrentProperties.Count; ++i) { %>
  486.                 <% if (i == 0) { ; } %>
  487.                     <%if (MyCurrentProperties.Count != 1){
  488.                     }
  489.  
  490.                 %>
  491.                 <% if (i == MyCurrentProperties.Count - 1) { Response.Write(""); } %>
  492.  
  493.                 <%=((NativePropertyInfo)MyCurrentProperties[i]).VisualBasicLangObject.HTMLDeclaration%>
  494.                 <%=((NativePropertyInfo)MyCurrentProperties[i]).MCLangObject.HTMLDeclaration%>
  495.                 <%=((NativePropertyInfo)MyCurrentProperties[i]).CSharpLangObject.HTMLDeclaration%>
  496.                 
  497.                 <HR style="color:blue">
  498.  
  499.             <% } %>
  500.         <% } 
  501.  
  502.         else if (MemberType.Equals("field")){
  503.             for (int i = 0; i < MyCurrentFields.Count; ++i){ 
  504.                 %>
  505.                 <%=((NativeFieldInfo)MyCurrentFields[i]).VisualBasicLangObject.HTMLDeclaration%>
  506.                 <%=((NativeFieldInfo)MyCurrentFields[i]).MCLangObject.HTMLDeclaration%>
  507.                 <%=((NativeFieldInfo)MyCurrentFields[i]).CSharpLangObject.HTMLDeclaration%>
  508.                 <%
  509.             }
  510.             
  511.  
  512.         } 
  513.         else {
  514.             for (int i = 0; i < MyCurrentEvents.Count; ++i){ 
  515.                 %>
  516.                 <%=((NativeEventInfo)MyCurrentEvents[i]).VisualBasicLangObject.HTMLDeclaration%>
  517.                 <%=((NativeEventInfo)MyCurrentEvents[i]).MCLangObject.HTMLDeclaration%>
  518.                 <%=((NativeEventInfo)MyCurrentEvents[i]).CSharpLangObject.HTMLDeclaration%>
  519.                 <%
  520.             }
  521.         }         
  522.         %>
  523.  
  524. <!-- END OF THE REF PAGE METADATA -->
  525.  
  526.    </Body>
  527. </HTML>
  528.                 
  529.