This sample demonstrates the usage of the Reflection classes, which are a feature in NGWS. Reflection allows object inspection and dynamic invocation. The reflector program uses NGWS reflection to inspect the methods and properties of the class named on the command line at runtime. You can also invoke the class’s methods at runtime by using the command line switches.
This sample list located in the Reflector directory of the NGWS SDK sample directories.
For Example:
C:\NGWSSDK\Samples\Reflector
In order to properly build and run this sample, the following steps need to be performed prior to building and running the sample.
For Example:
C:\NGWSSDK\Samples\Reflector\VC\:>NMAKE All
In order to run this sample, follow the instructions listed below.
For Example:
C:\NGWSSDK\Samples\Reflector\VC\:>Reflector -V -M Factorial
Output:
Class: Factorial Methods (12) System.Type GetType () System.String ToString () Boolean Equals (System.Object) Int32 GetHashCode () Void Wait () Boolean Wait (Int32) Void Notify () Void Notify (Boolean) Void NotifyAll () Int32 GetObjectContext () Int32 Value (Int32) Int32 calc (Int32)