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

  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 System;
  19.    
  20.     public sealed class LenientArrayPrototype : ArrayPrototype
  21.     {
  22.         public new object constructor;
  23.         public new object concat;
  24.         public new object join;
  25.         public new object pop;
  26.         public new object push;
  27.         public new object reverse;
  28.         public new object shift;
  29.         public new object slice;
  30.         public new object sort;
  31.         public new object splice;
  32.         public new object unshift;
  33.         public new object toLocaleString;
  34.         public new object toString;
  35.        
  36.         internal LenientArrayPrototype(FunctionPrototype funcprot, ObjectPrototype parent) : base(parent)
  37.         {
  38.             this.noExpando = false;
  39.             Type super = typeof(ArrayPrototype);
  40.             //this.constructor is given a value by the proper constructor class
  41.             this.concat = new BuiltinFunction("concat", this, super.GetMethod("concat"), funcprot);
  42.             this.join = new BuiltinFunction("join", this, super.GetMethod("join"), funcprot);
  43.             this.pop = new BuiltinFunction("pop", this, super.GetMethod("pop"), funcprot);
  44.             this.push = new BuiltinFunction("push", this, super.GetMethod("push"), funcprot);
  45.             this.reverse = new BuiltinFunction("reverse", this, super.GetMethod("reverse"), funcprot);
  46.             this.shift = new BuiltinFunction("shift", this, super.GetMethod("shift"), funcprot);
  47.             this.slice = new BuiltinFunction("slice", this, super.GetMethod("slice"), funcprot);
  48.             this.sort = new BuiltinFunction("sort", this, super.GetMethod("sort"), funcprot);
  49.             this.splice = new BuiltinFunction("splice", this, super.GetMethod("splice"), funcprot);
  50.             this.unshift = new BuiltinFunction("unshift", this, super.GetMethod("unshift"), funcprot);
  51.             this.toLocaleString = new BuiltinFunction("toLocaleString", this, super.GetMethod("toLocaleString"), funcprot);
  52.             this.toString = new BuiltinFunction("toString", this, super.GetMethod("toString"), funcprot);
  53.         }
  54.     }
  55. }

Developer Fusion