public class ActiveXObjectConstructor : ScriptFunction {
+ internal static ActiveXObjectConstructor Ctr = new ActiveXObjectConstructor ();
+
+ internal ActiveXObjectConstructor ()
+ {
+ }
+
[JSFunctionAttribute (JSFunctionAttributeEnum.HasVarArgs)]
public new Object CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class ArrayConstructor : ScriptFunction {
+ internal static ArrayConstructor Ctr = new ArrayConstructor ();
+
+ internal ArrayConstructor ()
+ {
+ }
+
public ArrayObject ConstructArray (Object [] args)
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class BooleanConstructor : ScriptFunction {
+ internal static BooleanConstructor Ctr = new BooleanConstructor ();
+
+ internal BooleanConstructor ()
+ {
+ }
+
[JSFunctionAttribute(JSFunctionAttributeEnum.HasVarArgs)]
public new BooleanObject CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
2004-11-25 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
+ * GlobalObject.cs: return the different kinds of object's
+ constructors.
+ * DateConstructor.cs, StringConstructor.cs, ObjectConstructor.cs,
+ NumberConstructor.cs, VBArrayConstructor.cs,
+ FunctionConstructor.cs, EnumeratorConstructor.cs,
+ BooleanConstructor.cs, ArrayConstructor.cs, RegExpConstructor.cs,
+ ActiveXObjectConstructor.cs : added default constructor and static
+ contructor field.
+ * ErrorConstructor.cs: added default and discriminatory ctrs. Let
+ us know which type of error we are.
+ * DateObject.cs: add field that hold the millisecond representation of date.
+ * JSError.cs, JScriptException.cs: back to Microsoft.JScript namespace.
+ * DatePrototype.cs: add default ctr.
+
* MathObject.cs: implement its methods.
2004-11-24 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
const double MS_PER_MINUTE = SECONDS_PER_MINUTE * MS_PER_SECOND;
const double MS_PER_DAY = SECONDS_PER_DAY * MS_PER_SECOND;
+ internal static DateConstructor Ctr = new DateConstructor ();
+
+ internal DateConstructor ()
+ {
+ }
+
[JSFunctionAttribute (JSFunctionAttributeEnum.HasVarArgs)]
public new DateObject CreateInstance (params Object[] args)
{
namespace Microsoft.JScript {
public class DateObject : JSObject
- {}
-}
\ No newline at end of file
+ {
+ internal double ms;
+
+ internal DateObject (double ms)
+ {
+ this.ms = ms;
+ }
+ }
+}
public class DatePrototype : DateObject
{
+ internal DatePrototype ()
+ : base (0)
+ {
+ }
+
public static DateConstructor constructor {
get { throw new NotImplementedException (); }
}
public class EnumeratorConstructor : ScriptFunction {
+ internal static EnumeratorConstructor Ctr = new EnumeratorConstructor ();
+
+ internal EnumeratorConstructor ()
+ {
+ }
+
[JSFunctionAttribute(JSFunctionAttributeEnum.HasVarArgs)]
public new EnumeratorObject CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class ErrorConstructor : ScriptFunction {
+ ErrorType error_type;
+ internal static ErrorConstructor Ctr = new ErrorConstructor ();
+ internal static ErrorConstructor EvalErrorCtr = new ErrorConstructor (ErrorType.EvalError);
+ internal static ErrorConstructor RangeErrorCtr = new ErrorConstructor (ErrorType.RangeError);
+ internal static ErrorConstructor ReferenceErrorCtr = new ErrorConstructor (ErrorType.ReferenceError);
+ internal static ErrorConstructor SyntaxErrorCtr = new ErrorConstructor (ErrorType.SyntaxError);
+ internal static ErrorConstructor TypeErrorCtr = new ErrorConstructor (ErrorType.TypeError);
+ internal static ErrorConstructor URIErrorCtr = new ErrorConstructor (ErrorType.URIError);
+
+ internal ErrorConstructor ()
+ {
+ }
+
+ internal ErrorConstructor (ErrorType errorType)
+ {
+ error_type = errorType;
+ }
+
[JSFunctionAttribute (JSFunctionAttributeEnum.HasVarArgs)]
public new ErrorObject CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class FunctionConstructor : ScriptFunction {
+ internal FunctionConstructor Ctr = new FunctionConstructor ();
+
+ internal FunctionConstructor ()
+ {
+ }
+
[JSFunctionAttribute(JSFunctionAttributeEnum.HasVarArgs)]
public new ScriptFunction CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public static readonly Empty undefined = null;
public static ActiveXObjectConstructor ActiveXObject {
- get { throw new NotImplementedException (); }
+ get { return ActiveXObjectConstructor.Ctr; }
}
public static ArrayConstructor Array {
- get { throw new NotImplementedException (); }
+ get { return ArrayConstructor.Ctr; }
}
public static BooleanConstructor Boolean {
- get { throw new NotImplementedException (); }
+ get { return BooleanConstructor.Ctr; }
}
public static Type boolean {
}
public static DateConstructor Date {
- get { throw new NotImplementedException (); }
+ get { return DateConstructor.Ctr; }
}
public static Type @decimal {
}
public static EnumeratorConstructor Enumerator {
- get { throw new NotImplementedException (); }
+ get { return EnumeratorConstructor.Ctr; }
}
public static ErrorConstructor Error {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.Ctr; }
}
[JSFunctionAttribute (0, JSBuiltin.Global_escape)]
}
public static ErrorConstructor EvalError {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.EvalErrorCtr; }
}
public static Type @float {
}
public static NumberConstructor Number {
- get { throw new NotImplementedException (); }
+ get { return NumberConstructor.Ctr; }
}
public static ObjectConstructor Object {
- get { throw new NotImplementedException (); }
+ get { return ObjectConstructor.Ctr; }
}
[JSFunctionAttribute (0, JSBuiltin.Global_parseFloat)]
}
public static ErrorConstructor RangeError {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.RangeErrorCtr; }
}
public static ErrorConstructor ReferenceError {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.ReferenceErrorCtr; }
}
public static RegExpConstructor RegExp {
- get { throw new NotImplementedException (); }
+ get { return RegExpConstructor.Ctr; }
}
[JSFunctionAttribute (0, JSBuiltin.Global_ScriptEngine)]
}
public static StringConstructor String {
- get { throw new NotImplementedException (); }
+ get { return StringConstructor.Ctr; }
}
public static ErrorConstructor SyntaxError {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.SyntaxErrorCtr; }
}
public static ErrorConstructor TypeError {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.TypeErrorCtr; }
}
[JSFunctionAttribute (0, JSBuiltin.Global_unescape)]
}
public static ErrorConstructor URIError {
- get { throw new NotImplementedException (); }
+ get { return ErrorConstructor.URIErrorCtr; }
}
public static VBArrayConstructor VBArray {
- get { throw new NotImplementedException (); }
+ get { return VBArrayConstructor.Ctr; }
}
public static Type @void {
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace Microsoft.JScript.Tmp
-{
+namespace Microsoft.JScript {
+
public enum JSError {
NoError,
InvalidCall,
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace Microsoft.JScript.Tmp
-{
- using System;
- using Microsoft.Vsa;
- using System.Runtime.Serialization;
+using System;
+using Microsoft.Vsa;
+using System.Runtime.Serialization;
+
+namespace Microsoft.JScript {
[Serializable]
public class JScriptException : ApplicationException, IVsaError
public class NoContextException : ApplicationException
{}
}
-
\ No newline at end of file
+
public class NumberConstructor : ScriptFunction {
+ internal static NumberConstructor Ctr = new NumberConstructor ();
+
+ internal NumberConstructor ()
+ {
+ }
+
public const double MAX_VALUE = Double.MaxValue;
public const double MIN_VALUE = Double.Epsilon;
public const double NaN = Double.NaN;
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class ObjectConstructor : ScriptFunction {
+ internal static ObjectConstructor Ctr = new ObjectConstructor ();
+
+ internal ObjectConstructor ()
+ {
+ }
+
public JSObject ConstructObject ()
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class RegExpConstructor : ScriptFunction {
+ internal static RegExpConstructor Ctr = new RegExpConstructor ();
+
+ internal RegExpConstructor ()
+ {
+ }
+
public Object Construct (string pattern, bool ignoreCase, bool global, bool multiLine)
{
throw new NotImplementedException ();
get { throw new NotImplementedException (); }
}
}
-}
\ No newline at end of file
+}
public class StringConstructor : ScriptFunction {
+ internal static StringConstructor Ctr = new StringConstructor ();
+
+ internal StringConstructor ()
+ {
+ }
+
[JSFunctionAttribute (JSFunctionAttributeEnum.HasVarArgs)]
public new StringObject CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}
public class VBArrayConstructor : ScriptFunction {
+ internal static VBArrayConstructor Ctr = new VBArrayConstructor ();
+
+ internal VBArrayConstructor ()
+ {
+ }
+
[JSFunctionAttribute(JSFunctionAttributeEnum.HasVarArgs)]
public new Object CreateInstance (params Object [] args)
{
throw new NotImplementedException ();
}
}
-}
\ No newline at end of file
+}