The Labs \ Source Viewer \ SSCLI \ Microsoft.JScript \ LenientObjectPrototype

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. namespace Microsoft.JScript
  16. {
  17.    
  18.     using Microsoft.JScript.Vsa;
  19.     using System;
  20.    
  21.     public class LenientObjectPrototype : ObjectPrototype
  22.     {
  23.         public new object constructor;
  24.         public new object hasOwnProperty;
  25.         public new object isPrototypeOf;
  26.         public new object propertyIsEnumerable;
  27.         public new object toLocaleString;
  28.         public new object toString;
  29.         public new object valueOf;
  30.        
  31.         internal LenientObjectPrototype(VsaEngine engine) : base()
  32.         {
  33.             this.engine = engine;
  34.             this.noExpando = false;
  35.             //this.constructor is given a value by the proper constructor class
  36.         }
  37.        
  38.         internal void Initialize(LenientFunctionPrototype funcprot)
  39.         {
  40.             Type super = typeof(ObjectPrototype);
  41.             this.hasOwnProperty = new BuiltinFunction("hasOwnProperty", this, super.GetMethod("hasOwnProperty"), funcprot);
  42.             this.isPrototypeOf = new BuiltinFunction("isPrototypeOf", this, super.GetMethod("isPrototypeOf"), funcprot);
  43.             this.propertyIsEnumerable = new BuiltinFunction("propertyIsEnumerable", this, super.GetMethod("propertyIsEnumerable"), funcprot);
  44.             this.toLocaleString = new BuiltinFunction("toLocaleString", this, super.GetMethod("toLocaleString"), funcprot);
  45.             this.toString = new BuiltinFunction("toString", this, super.GetMethod("toString"), funcprot);
  46.             this.valueOf = new BuiltinFunction("valueOf", this, super.GetMethod("valueOf"), funcprot);
  47.         }
  48.     }
  49. }

Developer Fusion