Add documentation for the evaluator
authorMiguel de Icaza <miguel@gnome.org>
Sun, 9 Nov 2008 22:44:29 +0000 (22:44 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sun, 9 Nov 2008 22:44:29 +0000 (22:44 -0000)
svn path=/trunk/mcs/; revision=118341

mcs/tools/csharplib/Makefile
mcs/tools/csharplib/en/Mono.CSharp/CompiledMethod.xml [new file with mode: 0644]
mcs/tools/csharplib/en/Mono.CSharp/Evaluator+NoValueSet.xml [new file with mode: 0644]
mcs/tools/csharplib/en/Mono.CSharp/Evaluator.xml [new file with mode: 0644]
mcs/tools/csharplib/en/Mono.CSharp/InteractiveBase+Simple.xml [new file with mode: 0644]
mcs/tools/csharplib/en/Mono.CSharp/InteractiveBase.xml [new file with mode: 0644]
mcs/tools/csharplib/en/Mono.CSharp/Report.xml [new file with mode: 0644]
mcs/tools/csharplib/en/index.xml [new file with mode: 0644]
mcs/tools/csharplib/en/ns-Mono.CSharp.xml [new file with mode: 0644]

index 587281e6b518a818c3987ffb453bdfe51e3f7450..416cac74d33002b1a6a6a36bac0cd65acc235fa8 100644 (file)
@@ -13,7 +13,18 @@ LIBRARY_NEEDS_POSTPROCESSING = yes
 
 LIBRARY = Mono.CSharp.dll
 
-EXTRA_DISTFILES = compiler.info link.xml
+docs = \
+       en/ns-Mono.CSharp.xml                           \
+       en/index.xml                                    \
+       en/Mono.CSharp                                  \
+       en/Mono.CSharp/Evaluator.xml                    \
+       en/Mono.CSharp/Evaluator+NoValueSet.xml         \
+       en/Mono.CSharp/InteractiveBase.xml              \
+       en/Mono.CSharp/Report.xml                       \
+       en/Mono.CSharp/CompiledMethod.xml               \
+       en/Mono.CSharp/InteractiveBase+Simple.xml
+
+EXTRA_DISTFILES = compiler.info link.xml $(docs)
 
 include ../../build/library.make
 
diff --git a/mcs/tools/csharplib/en/Mono.CSharp/CompiledMethod.xml b/mcs/tools/csharplib/en/Mono.CSharp/CompiledMethod.xml
new file mode 100644 (file)
index 0000000..18edb23
--- /dev/null
@@ -0,0 +1,30 @@
+<Type Name="CompiledMethod" FullName="Mono.CSharp.CompiledMethod">
+  <TypeSignature Language="C#" Value="public delegate void CompiledMethod(ref object retvalue);" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.CSharp</AssemblyName>
+    <AssemblyVersion>2.1.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Delegate</BaseTypeName>
+  </Base>
+  <Parameters>
+    <Parameter Name="retvalue" Type="System.Object&amp;" RefType="ref" />
+  </Parameters>
+  <ReturnValue>
+    <ReturnType>System.Void</ReturnType>
+  </ReturnValue>
+  <Docs>
+    <param name="retvalue">The return value.</param>
+    <summary>
+            A delegate that can be used to invoke the
+            compiled expression or statement.
+            </summary>
+    <remarks>
+            Since the Compile methods will compile
+            statements and expressions into the same
+            delegate, you can tell if a value was returned
+            by checking whether the returned value is of type
+            NoValueSet.
+            </remarks>
+  </Docs>
+</Type>
diff --git a/mcs/tools/csharplib/en/Mono.CSharp/Evaluator+NoValueSet.xml b/mcs/tools/csharplib/en/Mono.CSharp/Evaluator+NoValueSet.xml
new file mode 100644 (file)
index 0000000..50edaa6
--- /dev/null
@@ -0,0 +1,36 @@
+<Type Name="Evaluator+NoValueSet" FullName="Mono.CSharp.Evaluator+NoValueSet">
+  <TypeSignature Language="C#" Value="public class Evaluator.NoValueSet" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.CSharp</AssemblyName>
+    <AssemblyVersion>2.1.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Object</BaseTypeName>
+  </Base>
+  <Interfaces />
+  <Docs>
+    <summary>
+      Sentinel value used to indicate that no value was returned.
+    </summary>
+    <remarks>
+      A sentinel value used to indicate that no value was
+      was set by the compiled function.   This is used to
+      differentiate between a function not returning a
+      value and null.
+    </remarks>
+  </Docs>
+  <Members>
+    <Member MemberName=".ctor">
+      <MemberSignature Language="C#" Value="public NoValueSet ();" />
+      <MemberType>Constructor</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <Parameters />
+      <Docs>
+        <summary></summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+  </Members>
+</Type>
diff --git a/mcs/tools/csharplib/en/Mono.CSharp/Evaluator.xml b/mcs/tools/csharplib/en/Mono.CSharp/Evaluator.xml
new file mode 100644 (file)
index 0000000..7bbc013
--- /dev/null
@@ -0,0 +1,360 @@
+<Type Name="Evaluator" FullName="Mono.CSharp.Evaluator">
+  <TypeSignature Language="C#" Value="public class Evaluator" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.CSharp</AssemblyName>
+    <AssemblyVersion>2.1.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Object</BaseTypeName>
+  </Base>
+  <Interfaces />
+  <Docs>
+    <summary>
+            Evaluator: provides an API to evaluate C# statements and
+            expressions dynamically.
+            </summary>
+    <remarks>
+            This class exposes static methods to evaluate expressions in the
+            current program.
+            To initialize the evaluator with a number of compiler
+            options call the Init(string[]args) method with a set of
+            command line options that the compiler recognizes.
+            To interrupt execution of a statement, you can invoke the
+            Evaluator.Interrupt method.
+            </remarks>
+  </Docs>
+  <Members>
+    <Member MemberName="Compile">
+      <MemberSignature Language="C#" Value="public static Mono.CSharp.CompiledMethod Compile (string input);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>Mono.CSharp.CompiledMethod</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="input" Type="System.String" />
+      </Parameters>
+      <Docs>
+        <param name="input">The expression or statement to compile.</param>
+        <summary>
+            Compiles the input string and returns a delegate that represents the compiled code.
+            </summary>
+        <returns></returns>
+        <remarks>
+            Compiles the input string as a C# expression or
+            statement, unlike the Evaluate method, the
+            resulting delegate can be invoked multiple times
+            without incurring in the compilation overhead.
+            This method can only deal with fully formed input
+            strings and does not provide a completion mechanism.
+            If you must deal with partial input (for example for
+            interactive use) use the other overload.
+            On success, a delegate is returned that can be used
+            to invoke the method.
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Compile">
+      <MemberSignature Language="C#" Value="public static string Compile (string input, out Mono.CSharp.CompiledMethod compiled);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="input" Type="System.String" />
+        <Parameter Name="compiled" Type="Mono.CSharp.CompiledMethod&amp;" RefType="out" />
+      </Parameters>
+      <Docs>
+        <param name="input">The expression or statement to compile.</param>
+        <param name="compiled">The compiled code will be returned in this delegate.</param>
+        <summary>
+            Compiles the input string and returns a delegate that represents the compiled code.
+            </summary>
+        <returns>On success, a delegate that can be used to invoke the compiled code repeatedly.</returns>
+        <remarks>
+         <para>
+            Compiles the input string as a C# expression or
+            statement, unlike the Evaluate method, the
+            resulting delegate can be invoked multiple times
+            without incurring in the compilation overhead.
+         </para>
+         <para>
+            If the return value of this function is null,
+            this indicates that the parsing was complete.
+         </para>
+         <para>
+            If the return value is a string it indicates
+            that the input string was partial and that the
+            invoking code should provide more code before
+            the code can be successfully compiled.
+         </para>
+         <para>
+            If you know that you will always get full expressions or
+            statements and do not care about partial input, you can use
+            the other Compile overload.
+         </para>
+         <para>
+            On success, in addition to returning null, the
+            compiled parameter will be set to the delegate
+            that can be invoked to execute the code.
+         </para>
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Evaluate">
+      <MemberSignature Language="C#" Value="public static object Evaluate (string input);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Object</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="input" Type="System.String" />
+      </Parameters>
+      <Docs>
+        <param name="input">The expression to evaluate.</param>
+        <summary>
+            Evaluates and expression or statement and returns the result.
+            </summary>
+        <returns>The result of computing the expression.</returns>
+        <remarks>
+            Evaluates the input string as a C# expression or
+            statement and returns the value.
+            This method will throw an exception if there is a syntax error,
+            of if the provided input is not an expression but a statement.
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Evaluate">
+      <MemberSignature Language="C#" Value="public static string Evaluate (string input, out object result, out bool result_set);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="input" Type="System.String" />
+        <Parameter Name="result" Type="System.Object&amp;" RefType="out" />
+        <Parameter Name="result_set" Type="System.Boolean&amp;" RefType="out" />
+      </Parameters>
+      <Docs>
+        <param name="input">The expression to evaluate.</param>
+        <param name="result">The result will be stored here.</param>
+        <param name="result_set">If this value is true, the result was set and can be used, otherwise it was not set.</param>
+        <summary>
+            Evaluates and expression or statement and returns any result values.
+            </summary>
+        <returns>If null, the parsing was successful, if not, it means that the input is partial.</returns>
+        <remarks>
+         <para>
+            Evaluates the input string as a C# expression or
+            statement.  If the input string is an expression
+            the result will be stored in the result variable
+            and the result_set variable will be set to true.
+            It is necessary to use the result/result_set
+            pair to identify when a result was set (for
+            example, execution of user-provided input can be
+            an expression, a statement or others, and
+            result_set would only be set if the input was an
+            expression.
+         </para>
+         <para>
+            If the return value of this function is null,
+            this indicates that the parsing was complete.
+            If the return value is a string, it indicates
+            that the input is partial and that the user
+            should provide an updated string.
+         </para>
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="GetUsing">
+      <MemberSignature Language="C#" Value="public static string GetUsing ();" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>Returns a list of the active using statements.</summary>
+        <returns>A list of active using statements.</returns>
+        <remarks>This result can be shown to the user.</remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="GetVars">
+      <MemberSignature Language="C#" Value="public static string GetVars ();" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>Returns a list of all local variables.</summary>
+        <returns>A user-visible list of all local variables defined when invoking the evaluator.</returns>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Init">
+      <MemberSignature Language="C#" Value="public static void Init (string[] args);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="args" Type="System.String[]" />
+      </Parameters>
+      <Docs>
+        <param name="args">Compiler options.</param>
+        <summary>
+            Optional initialization for the Evaluator.
+            </summary>
+        <remarks>
+         <para>
+            Initializes the Evaluator with the command line options
+            that would be processed by the command line compiler.  Only
+            the first call to Init will work, any future invocations are
+            ignored.
+         </para>
+         <para>
+            You can safely avoid calling this method if your application
+            does not need any of the features exposed by the command line
+            interface.
+         </para>
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="InteractiveBaseClass">
+      <MemberSignature Language="C#" Value="public static Type InteractiveBaseClass { set; get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Type</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            The base class for the classes that host the user generated code
+            </summary>
+        <value></value>
+        <remarks>
+         <para>
+            This is the base class that will host the code
+            executed by the Evaluator.  By default
+            this is the Mono.CSharp.InteractiveBase class
+            which is useful for interactive use.
+         </para>
+         <para>
+            By changing this property you can control the
+            base class and the static members that are
+            available to your evaluated code.
+         </para>
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Interrupt">
+      <MemberSignature Language="C#" Value="public static void Interrupt ();" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>
+            Interrupts the evaluation of an expression executing in Evaluate.
+            </summary>
+        <remarks>
+            Use this method to interrupt long-running invocations.
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="LoadAssembly">
+      <MemberSignature Language="C#" Value="public static void LoadAssembly (string file);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="file" Type="System.String" />
+      </Parameters>
+      <Docs>
+        <param name="file">The filename that holds the assembly.</param>
+        <summary>
+            Loads the given assembly and exposes the API to the user.
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="ReferenceAssembly">
+      <MemberSignature Language="C#" Value="public static void ReferenceAssembly (System.Reflection.Assembly a);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="a" Type="System.Reflection.Assembly" />
+      </Parameters>
+      <Docs>
+        <param name="a">The assembly to expose to the evaluated expressions.</param>
+        <summary>
+            Exposes the API of the given assembly to the Evaluator
+            </summary>
+        <remarks>After this invocation, the types from the referenced
+        assembly will be accessible to code executed by the
+        evaluator.</remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Run">
+      <MemberSignature Language="C#" Value="public static bool Run (string statement);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="statement" Type="System.String" />
+      </Parameters>
+      <Docs>
+        <param name="statement">A statement to execute.</param>
+        <summary>
+            Executes the given expression or statement.
+            </summary>
+        <returns>True if the code was succesfully parsed.</returns>
+        <remarks>
+            Executes the provided statement, returns true
+            on success, false on parsing errors.  Exceptions
+            might be thrown by the called code.
+        </remarks>
+      </Docs>
+    </Member>
+  </Members>
+</Type>
diff --git a/mcs/tools/csharplib/en/Mono.CSharp/InteractiveBase+Simple.xml b/mcs/tools/csharplib/en/Mono.CSharp/InteractiveBase+Simple.xml
new file mode 100644 (file)
index 0000000..e85ed01
--- /dev/null
@@ -0,0 +1,18 @@
+<Type Name="InteractiveBase+Simple" FullName="Mono.CSharp.InteractiveBase+Simple">
+  <TypeSignature Language="C#" Value="public delegate void InteractiveBase.Simple();" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.CSharp</AssemblyName>
+    <AssemblyVersion>2.1.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Delegate</BaseTypeName>
+  </Base>
+  <Parameters />
+  <ReturnValue>
+    <ReturnType>System.Void</ReturnType>
+  </ReturnValue>
+  <Docs>
+    <summary>A helper delegate to a void method.</summary>
+    <remarks>Equivalent to a System.Action.</remarks>
+  </Docs>
+</Type>
diff --git a/mcs/tools/csharplib/en/Mono.CSharp/InteractiveBase.xml b/mcs/tools/csharplib/en/Mono.CSharp/InteractiveBase.xml
new file mode 100644 (file)
index 0000000..98783b3
--- /dev/null
@@ -0,0 +1,271 @@
+<Type Name="InteractiveBase" FullName="Mono.CSharp.InteractiveBase">
+  <TypeSignature Language="C#" Value="public class InteractiveBase" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.CSharp</AssemblyName>
+    <AssemblyVersion>2.1.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Object</BaseTypeName>
+  </Base>
+  <Interfaces />
+  <Docs>
+    <summary>
+            The default base class for every interaction line
+            </summary>
+    <remarks>
+            The expressions and statements behave as if they were
+            a static method of this class.   The InteractiveBase class
+            contains a number of useful methods, but can be overwritten
+            by setting the InteractiveBaseType property in the Evaluator
+            </remarks>
+  </Docs>
+  <Members>
+    <Member MemberName="ContinuationPrompt">
+      <MemberSignature Language="C#" Value="public static string ContinuationPrompt;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            The secondary prompt.
+            </summary>
+        <remarks>The secondary prompt is used for interactive use
+        (used when an expression is incomplete).</remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Describe">
+      <MemberSignature Language="C#" Value="public static string Describe (object x);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="x" Type="System.Object" />
+      </Parameters>
+      <Docs>
+        <param name="x">An object or a type.</param>
+        <summary>
+            Describes an object or a type.
+            </summary>
+        <returns>A user friendly rendering of the type.</returns>
+        <remarks>
+            This method will show a textual representation
+            of the object's type.  If the object is a
+            System.Type it renders the type directly,
+            otherwise it renders the type returned by
+            invoking GetType on the object.
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Error">
+      <MemberSignature Language="C#" Value="public static System.IO.TextWriter Error;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.IO.TextWriter</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Determines where the standard error of methods in this class will go.
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="help">
+      <MemberSignature Language="C#" Value="public static string help { get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Returns a list of available static methods.
+            </summary>
+        <value></value>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="LoadAssembly">
+      <MemberSignature Language="C#" Value="public static void LoadAssembly (string assembly);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="assembly" Type="System.String" />
+      </Parameters>
+      <Docs>
+        <param name="assembly">The file to load.</param>
+        <summary>
+            Loads the assembly
+            </summary>
+        <remarks>
+            Loads the specified assembly and makes its types
+            available to the evaluator.  This is equivalent
+            to passing the -pkg: command line flag to the C#
+            compiler on the command line.
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="LoadPackage">
+      <MemberSignature Language="C#" Value="public static void LoadPackage (string pkg);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="pkg" Type="System.String" />
+      </Parameters>
+      <Docs>
+        <param name="pkg">The name of the package to load.</param>
+        <summary>
+            Loads the assemblies from a package
+            </summary>
+        <remarks>
+            Loads the assemblies from a package.   This is equivalent
+            to passing the -pkg: command line flag to the C# compiler
+            on the command line.
+            </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Output">
+      <MemberSignature Language="C#" Value="public static System.IO.TextWriter Output;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.IO.TextWriter</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Determines where the standard output of methods in this class will go.
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Prompt">
+      <MemberSignature Language="C#" Value="public static string Prompt;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.String</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            The primary prompt used for interactive use.
+            </summary>
+        <remarks>This is the primary prompt to be used by
+        read-eval-print-loop implementations. </remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="quit">
+      <MemberSignature Language="C#" Value="public static object quit { get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Object</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Indicates to the read-eval-print-loop that the interaction should be finished.
+            </summary>
+        <value></value>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="QuitRequested">
+      <MemberSignature Language="C#" Value="public static bool QuitRequested;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Used to signal that the user has invoked the  `quit' statement.
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="ShowUsing">
+      <MemberSignature Language="C#" Value="public static void ShowUsing ();" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>
+            Displays the using statements in effect at this point.
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="ShowVars">
+      <MemberSignature Language="C#" Value="public static void ShowVars ();" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Void</ReturnType>
+      </ReturnValue>
+      <Parameters />
+      <Docs>
+        <summary>
+            Shows all the variables defined so far.
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Time">
+      <MemberSignature Language="C#" Value="public static TimeSpan Time (Mono.CSharp.InteractiveBase.Simple a);" />
+      <MemberType>Method</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.TimeSpan</ReturnType>
+      </ReturnValue>
+      <Parameters>
+        <Parameter Name="a" Type="Mono.CSharp.InteractiveBase+Simple" />
+      </Parameters>
+      <Docs>
+        <param name="a">The method to time.</param>
+        <summary>
+            Times the execution of the given delegate
+            </summary>
+        <returns>The time it took for the method passed to execute.</returns>
+        <remarks>This is a very simple benchmarking tool.</remarks>
+      </Docs>
+    </Member>
+  </Members>
+</Type>
diff --git a/mcs/tools/csharplib/en/Mono.CSharp/Report.xml b/mcs/tools/csharplib/en/Mono.CSharp/Report.xml
new file mode 100644 (file)
index 0000000..0db0b4a
--- /dev/null
@@ -0,0 +1,96 @@
+<Type Name="Report" FullName="Mono.CSharp.Report">
+  <TypeSignature Language="C#" Value="public class Report" />
+  <AssemblyInfo>
+    <AssemblyName>Mono.CSharp</AssemblyName>
+    <AssemblyVersion>2.1.0.0</AssemblyVersion>
+  </AssemblyInfo>
+  <Base>
+    <BaseTypeName>System.Object</BaseTypeName>
+  </Base>
+  <Interfaces />
+  <Docs>
+    <summary>
+            This class is used to report errors and warnings to te user.
+            </summary>
+    <remarks></remarks>
+  </Docs>
+  <Members>
+    <Member MemberName="Errors">
+      <MemberSignature Language="C#" Value="public static int Errors;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Errors encountered so far
+            </summary>
+        <remarks>The number of errors reported</remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Stderr">
+      <MemberSignature Language="C#" Value="public static System.IO.TextWriter Stderr;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.IO.TextWriter</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>The TextWriter used to report errors.</summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="WarningLevel">
+      <MemberSignature Language="C#" Value="public static int WarningLevel { set; get; }" />
+      <MemberType>Property</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>The warning level for reporting errors.</summary>
+        <value></value>
+        <remarks>See the compiler manual page for the possible values for the this variable.</remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="Warnings">
+      <MemberSignature Language="C#" Value="public static int Warnings;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Int32</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Warnings encountered so far
+            </summary>
+        <remarks></remarks>
+      </Docs>
+    </Member>
+    <Member MemberName="WarningsAreErrors">
+      <MemberSignature Language="C#" Value="public static bool WarningsAreErrors;" />
+      <MemberType>Field</MemberType>
+      <AssemblyInfo>
+        <AssemblyVersion>2.1.0.0</AssemblyVersion>
+      </AssemblyInfo>
+      <ReturnValue>
+        <ReturnType>System.Boolean</ReturnType>
+      </ReturnValue>
+      <Docs>
+        <summary>
+            Whether warnings should be considered errors
+            </summary>
+        <remarks>Equivalent to passing -warnaserror to the compiler.</remarks>
+      </Docs>
+    </Member>
+  </Members>
+</Type>
diff --git a/mcs/tools/csharplib/en/index.xml b/mcs/tools/csharplib/en/index.xml
new file mode 100644 (file)
index 0000000..e6ea17e
--- /dev/null
@@ -0,0 +1,39 @@
+<Overview>
+  <Assemblies>
+    <Assembly Name="Mono.CSharp" Version="2.1.0.0">
+      <Attributes>
+        <Attribute>
+          <AttributeName>System.Reflection.AssemblyCompany("Novell, Inc.")</AttributeName>
+        </Attribute>
+        <Attribute>
+          <AttributeName>System.Reflection.AssemblyConfiguration("")</AttributeName>
+        </Attribute>
+        <Attribute>
+          <AttributeName>System.Reflection.AssemblyCopyright("2001 - 2008 Novell, Inc.")</AttributeName>
+        </Attribute>
+        <Attribute>
+          <AttributeName>System.Reflection.AssemblyProduct("Mono")</AttributeName>
+        </Attribute>
+        <Attribute>
+          <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
+        </Attribute>
+        <Attribute>
+          <AttributeName>System.Reflection.AssemblyTitle("Embedded C# Compiler and Library")</AttributeName>
+        </Attribute>
+      </Attributes>
+    </Assembly>
+  </Assemblies>
+  <Remarks>To be added.</Remarks>
+  <Copyright>To be added.</Copyright>
+  <Types>
+    <Namespace Name="Mono.CSharp">
+      <Type Name="CompiledMethod" Kind="Delegate" />
+      <Type Name="Evaluator" Kind="Class" />
+      <Type Name="Evaluator+NoValueSet" Kind="Class" />
+      <Type Name="InteractiveBase" Kind="Class" />
+      <Type Name="InteractiveBase+Simple" Kind="Delegate" />
+      <Type Name="Report" Kind="Class" />
+    </Namespace>
+  </Types>
+  <Title>Mono.CSharp</Title>
+</Overview>
diff --git a/mcs/tools/csharplib/en/ns-Mono.CSharp.xml b/mcs/tools/csharplib/en/ns-Mono.CSharp.xml
new file mode 100644 (file)
index 0000000..0513c0f
--- /dev/null
@@ -0,0 +1,63 @@
+<Namespace Name="Mono.CSharp">
+  <Docs>
+    <summary>C# Compiler Service and Runtime Evaulator.</summary>
+    <remarks>
+      <para>
+       The Mono.CSharp.dll assembly is a repackaging of Mono's C#
+       compiler and provides access to the C# compiler as a service.
+       It implements a C# eval.  It allows applications to compile
+       and execute C# statements and expressions at runtime.
+      </para>
+      <para>
+       This API is not yet final and will likely change as we get a
+       better understanding of how developers will like to use the
+       Mono C# Compiler Service.  You can make a local copy of the
+       Mono.CSharp.dll assembly and reference that locally as we are
+       not commiting to the stability of this API yet. 
+      </para>
+      <para>
+       The evaluator currently exposes a statement and expression API
+       and will allow the consumer to execute statements or compute
+       the value of expressions and get the results back.  Support
+       for compiling classes will appear in a future version.  The
+       <see cref="M:Mono.CSharp.Evaluator.Run(string)"/> method is a
+       convenient way of executing expressions and stamtements and
+       discarding the result.  If you want to get the results of
+       executing an expression use the <see
+       cref="M:Mono.CSharp.Evaluator.Evaluate(string)"/> method
+       instead.
+      </para>
+      <para>
+       Variables declared during evaluation will continue to be made
+       available on upcoming invocations.  This allows variables to
+       be declared and reused later.  
+      </para>
+      <para>
+       The evaluator does not have direct access to any assemblies
+       that are not explicitly referenced through the Evaluator's
+       <see
+       cref="M:Mono.CSharp.Evaluator.ReferenceAssembly(System.Reflection.Assembly)"/>
+       method.
+      </para>
+      <para>
+       The API exposes similar entry points, some are used for
+       read-eval-print loops where more control over partial-input is
+       required.  Another set of entry points are provided when this
+       functionality is not required.
+      </para>
+      <para>
+       The following are limitations in the Mono 2.2 API and will change in the future:
+      </para>
+      <para>
+       Using statements are currently global, once the using
+       statement has been issued, it remains active.
+      </para>
+      <para>
+       If you want to create local variables that are not visible
+       across multiple evaluations, you will have to create a new
+       <see cref="T:System.AppDomain"/> and invoke the compiler
+       there.
+      </para>
+    </remarks>
+  </Docs>
+</Namespace>