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

  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 LenientStringPrototype : StringPrototype
  21.     {
  22.         public new object constructor;
  23.         public new object anchor;
  24.         public new object big;
  25.         public new object blink;
  26.         public new object bold;
  27.         public new object charAt;
  28.         public new object charCodeAt;
  29.         public new object concat;
  30.         public new object @fixed;
  31.         public new object fontcolor;
  32.         public new object fontsize;
  33.         public new object indexOf;
  34.         public new object italics;
  35.         public new object lastIndexOf;
  36.         public new object link;
  37.         public new object localeCompare;
  38.         public new object match;
  39.         public new object replace;
  40.         public new object search;
  41.         public new object slice;
  42.         public new object small;
  43.         public new object split;
  44.         public new object strike;
  45.         public new object sub;
  46.         [NotRecommended("substr")]
  47.         public new object substr;
  48.         public new object substring;
  49.         public new object sup;
  50.         public new object toLocaleLowerCase;
  51.         public new object toLocaleUpperCase;
  52.         public new object toLowerCase;
  53.         public new object toString;
  54.         public new object toUpperCase;
  55.         public new object valueOf;
  56.        
  57.         internal LenientStringPrototype(LenientFunctionPrototype funcprot, LenientObjectPrototype parent) : base(funcprot, parent)
  58.         {
  59.             this.noExpando = false;
  60.            
  61.             //this.constructor is given a value by the proper constructor class
  62.             Type super = typeof(StringPrototype);
  63.             this.anchor = new BuiltinFunction("anchor", this, super.GetMethod("anchor"), funcprot);
  64.             this.big = new BuiltinFunction("big", this, super.GetMethod("big"), funcprot);
  65.             this.blink = new BuiltinFunction("blink", this, super.GetMethod("blink"), funcprot);
  66.             this.bold = new BuiltinFunction("bold", this, super.GetMethod("bold"), funcprot);
  67.             this.charAt = new BuiltinFunction("charAt", this, super.GetMethod("charAt"), funcprot);
  68.             this.charCodeAt = new BuiltinFunction("charCodeAt", this, super.GetMethod("charCodeAt"), funcprot);
  69.             this.concat = new BuiltinFunction("concat", this, super.GetMethod("concat"), funcprot);
  70.             this.@fixed = new BuiltinFunction("fixed", this, super.GetMethod("fixed"), funcprot);
  71.             this.fontcolor = new BuiltinFunction("fontcolor", this, super.GetMethod("fontcolor"), funcprot);
  72.             this.fontsize = new BuiltinFunction("fontsize", this, super.GetMethod("fontsize"), funcprot);
  73.             this.indexOf = new BuiltinFunction("indexOf", this, super.GetMethod("indexOf"), funcprot);
  74.             this.italics = new BuiltinFunction("italics", this, super.GetMethod("italics"), funcprot);
  75.             this.lastIndexOf = new BuiltinFunction("lastIndexOf", this, super.GetMethod("lastIndexOf"), funcprot);
  76.             this.link = new BuiltinFunction("link", this, super.GetMethod("link"), funcprot);
  77.             this.localeCompare = new BuiltinFunction("localeCompare", this, super.GetMethod("localeCompare"), funcprot);
  78.             this.match = new BuiltinFunction("match", this, super.GetMethod("match"), funcprot);
  79.             this.replace = new BuiltinFunction("replace", this, super.GetMethod("replace"), funcprot);
  80.             this.search = new BuiltinFunction("search", this, super.GetMethod("search"), funcprot);
  81.             this.slice = new BuiltinFunction("slice", this, super.GetMethod("slice"), funcprot);
  82.             this.small = new BuiltinFunction("small", this, super.GetMethod("small"), funcprot);
  83.             this.split = new BuiltinFunction("split", this, super.GetMethod("split"), funcprot);
  84.             this.strike = new BuiltinFunction("strike", this, super.GetMethod("strike"), funcprot);
  85.             this.sub = new BuiltinFunction("sub", this, super.GetMethod("sub"), funcprot);
  86.             this.substr = new BuiltinFunction("substr", this, super.GetMethod("substr"), funcprot);
  87.             this.substring = new BuiltinFunction("substring", this, super.GetMethod("substring"), funcprot);
  88.             this.sup = new BuiltinFunction("sup", this, super.GetMethod("sup"), funcprot);
  89.             this.toLocaleLowerCase = new BuiltinFunction("toLocaleLowerCase", this, super.GetMethod("toLocaleLowerCase"), funcprot);
  90.             this.toLocaleUpperCase = new BuiltinFunction("toLocaleUpperCase", this, super.GetMethod("toLocaleUpperCase"), funcprot);
  91.             this.toLowerCase = new BuiltinFunction("toLowerCase", this, super.GetMethod("toLowerCase"), funcprot);
  92.             this.toString = new BuiltinFunction("toString", this, super.GetMethod("toString"), funcprot);
  93.             this.toUpperCase = new BuiltinFunction("toUpperCase", this, super.GetMethod("toUpperCase"), funcprot);
  94.             this.valueOf = new BuiltinFunction("valueOf", this, super.GetMethod("valueOf"), funcprot);
  95.         }
  96.     }
  97. }

Developer Fusion