@magic-xpa/mscorelib 4.702.0-dev472.353 → 4.800.0-dev000.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/bundles/magic-xpa-mscorelib.umd.js +79 -170
  2. package/bundles/magic-xpa-mscorelib.umd.js.map +1 -1
  3. package/bundles/magic-xpa-mscorelib.umd.min.js +1 -15
  4. package/bundles/magic-xpa-mscorelib.umd.min.js.map +1 -1
  5. package/esm2015/index.js +1 -1
  6. package/esm2015/magic-xpa-mscorelib.js +1 -4
  7. package/esm2015/src/ApplicationException.js +1 -1
  8. package/esm2015/src/ArrayEnumerator.js +1 -1
  9. package/esm2015/src/BitArray.js +2 -22
  10. package/esm2015/src/Char.js +1 -1
  11. package/esm2015/src/CultureInfo.js +1 -1
  12. package/esm2015/src/DateTime.js +1 -6
  13. package/esm2015/src/Debug.js +1 -1
  14. package/esm2015/src/Dictionary.js +1 -1
  15. package/esm2015/src/Encoding.js +44 -52
  16. package/esm2015/src/Exception.js +1 -14
  17. package/esm2015/src/HashTable.js +3 -20
  18. package/esm2015/src/IComparable.js +1 -1
  19. package/esm2015/src/ISO_8859_1_Encoding.js +1 -1
  20. package/esm2015/src/Int32.js +1 -1
  21. package/esm2015/src/Int64.js +1 -1
  22. package/esm2015/src/List.js +2 -6
  23. package/esm2015/src/NChar.js +1 -1
  24. package/esm2015/src/NNumber.js +2 -15
  25. package/esm2015/src/NString.js +2 -8
  26. package/esm2015/src/NotImplementedException.js +1 -1
  27. package/esm2015/src/NumberFormatInfo.js +2 -2
  28. package/esm2015/src/RefParam.js +1 -1
  29. package/esm2015/src/Stack.js +1 -1
  30. package/esm2015/src/StackFrame.js +1 -3
  31. package/esm2015/src/StackTrace.js +1 -6
  32. package/esm2015/src/StringBuilder.js +1 -15
  33. package/esm2015/src/StringUtils.js +1 -1
  34. package/esm2015/src/Thread.js +1 -5
  35. package/esm2015/src/WebException.js +1 -1
  36. package/esm2015/src/XmlConvert.js +1 -2
  37. package/fesm2015/magic-xpa-mscorelib.js +53 -167
  38. package/fesm2015/magic-xpa-mscorelib.js.map +1 -1
  39. package/magic-xpa-mscorelib.d.ts +0 -3
  40. package/package.json +1 -1
@@ -1,8 +1,29 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('util'), require('moment'), require('text-encoding'), require('stacktrace-js'), require('rxjs')) :
3
3
  typeof define === 'function' && define.amd ? define('@magic-xpa/mscorelib', ['exports', 'util', 'moment', 'text-encoding', 'stacktrace-js', 'rxjs'], factory) :
4
- (global = global || self, factory((global['magic-xpa'] = global['magic-xpa'] || {}, global['magic-xpa'].mscorelib = {}), global.util, global.momentNs, global.textEncoding, global.StackTrace$1, global.rxjs));
5
- }(this, (function (exports, util, momentNs, textEncoding, StackTrace$1, rxjs) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["magic-xpa"] = global["magic-xpa"] || {}, global["magic-xpa"].mscorelib = {}), global.util, global.momentNs, global.textEncoding, global.StackTrace$1, global.rxjs));
5
+ })(this, (function (exports, util, momentNs, textEncoding, StackTrace$1, rxjs) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var momentNs__namespace = /*#__PURE__*/_interopNamespace(momentNs);
26
+ var StackTrace__namespace = /*#__PURE__*/_interopNamespace(StackTrace$1);
6
27
 
7
28
  /*! *****************************************************************************
8
29
  Copyright (c) Microsoft Corporation.
@@ -296,7 +317,6 @@
296
317
  return value;
297
318
  }
298
319
 
299
- /// <summary>
300
320
  var Exception = /** @class */ (function () {
301
321
  function Exception(messageOrError) {
302
322
  this.name = "Exception";
@@ -315,9 +335,6 @@
315
335
  }
316
336
  }
317
337
  Object.defineProperty(Exception.prototype, "Message", {
318
- /// <summary>
319
- /// get the message of exception
320
- /// </summary>
321
338
  get: function () {
322
339
  return this.message;
323
340
  },
@@ -325,22 +342,15 @@
325
342
  configurable: true
326
343
  });
327
344
  Object.defineProperty(Exception.prototype, "StackTrace", {
328
- /// <summary>
329
- /// get the stack trace of exception
330
- /// </summary>
331
345
  get: function () {
332
346
  var stackTrace = this.stack || '';
333
347
  var stackLines = stackTrace.split("\n").map(function (line) { return line.trim(); });
334
- // On some browsers (e.g. Chrome), the statck includes a title as "Error", so remove it.
335
348
  stackTrace = stackLines.splice(stackLines[0] === 'Error' ? this.errorLevel + 1 : this.errorLevel).join("\n");
336
349
  return "\n" + stackTrace;
337
350
  },
338
351
  enumerable: false,
339
352
  configurable: true
340
353
  });
341
- /// <summary>
342
- /// get the type of exception
343
- /// </summary>
344
354
  Exception.prototype.GetType = function () {
345
355
  return this.name;
346
356
  };
@@ -382,44 +392,24 @@
382
392
  return Array_Enumerator;
383
393
  }());
384
394
 
385
- /// <summary>
386
- /// Manages a compact array of bit values,
387
- // which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).
388
- /// </summary>
389
395
  var BitArray = /** @class */ (function () {
390
396
  function BitArray(length) {
391
- this.array = null; // array of boolean values
397
+ this.array = null;
392
398
  this.array = new Array(length).fill(false);
393
399
  }
394
400
  Object.defineProperty(BitArray.prototype, "Length", {
395
- /// <summary>
396
- /// returns the length of array
397
- /// </summary>
398
- /// <returns></returns>
399
401
  get: function () {
400
402
  return this.array.length;
401
403
  },
402
404
  enumerable: false,
403
405
  configurable: true
404
406
  });
405
- /// <summary>
406
- /// get the value of flag at specified index
407
- /// </summary>
408
- /// <returns></returns>
409
407
  BitArray.prototype.Get = function (index) {
410
408
  return this.array[index];
411
409
  };
412
- /// <summary>
413
- /// set the value of flag at specified index
414
- /// </summary>
415
- /// <returns></returns>
416
410
  BitArray.prototype.Set = function (index, value) {
417
411
  this.array[index] = value;
418
412
  };
419
- /// <summary>
420
- /// set all the flags with specified value
421
- /// </summary>
422
- /// <returns></returns>
423
413
  BitArray.prototype.SetAll = function (value) {
424
414
  this.array.forEach(function (x) {
425
415
  x = value;
@@ -443,19 +433,17 @@
443
433
  }());
444
434
  CultureInfo.InvariantCulture = new CultureInfo();
445
435
 
446
- var moment = momentNs;
436
+ var moment = momentNs__namespace;
437
+ exports.DateTimeKind = void 0;
447
438
  (function (DateTimeKind) {
448
439
  DateTimeKind[DateTimeKind["Local"] = 0] = "Local";
449
440
  DateTimeKind[DateTimeKind["Utc"] = 1] = "Utc";
450
441
  })(exports.DateTimeKind || (exports.DateTimeKind = {}));
451
- // @dynamic
452
442
  var DateTime = /** @class */ (function () {
453
443
  function DateTime(yearOrDate, month, day, hour, minute, second) {
454
444
  this.dt = null;
455
445
  this.kind = null;
456
- // the number of .net ticks at the unix epoch
457
446
  this.epochTicks = 621355968000000000;
458
- // there are 10000 .net ticks per millisecond
459
447
  this.ticksPerMillisecond = 10000;
460
448
  if (arguments.length === 1) {
461
449
  this.dt = yearOrDate;
@@ -470,8 +458,6 @@
470
458
  }
471
459
  Object.defineProperty(DateTime.prototype, "Ticks", {
472
460
  get: function () {
473
- // https://stackoverflow.com/questions/7966559/how-to-convert-javascript-date-object-to-ticks
474
- // TODO - check if we need this or to use Misc.getSystemMilliseconds()
475
461
  return ((this.dt.getTime() * this.ticksPerMillisecond) + this.epochTicks) - (this.dt.getTimezoneOffset() * 600000000);
476
462
  },
477
463
  enumerable: false,
@@ -637,11 +623,6 @@
637
623
  bytes = this.textEncoder.encode(str);
638
624
  }
639
625
  catch (ex) {
640
- // In C#, if any character is not within the range of specified charset, it is replaced by '?'.
641
- // TextEncoder.encode() throws an error in such a case.
642
- // We can modify the implementation of TextEncoder.encode() to put '?' instead of throwing error.
643
- // But, it can be problematic if we change the library version.
644
- // So, we will catch this error and handle the encoding ourselves.
645
626
  bytes = new Uint8Array(str.length * 3);
646
627
  var bytesCount = 0;
647
628
  var tmpBytes = void 0;
@@ -660,7 +641,6 @@
660
641
  return bytes;
661
642
  };
662
643
  Encoding.prototype.GetByteCount = function (str) {
663
- // TODO: this is not the best way.
664
644
  return this.GetBytes(str).length;
665
645
  };
666
646
  Encoding.prototype.GetString = function (bytes, index, count) {
@@ -685,53 +665,51 @@
685
665
  };
686
666
  Encoding.PopulateCodePageToEncodingMap = function () {
687
667
  var hashTable = new Object;
688
- // These map is similar to enc_map_table of exp_xml.cpp
689
- hashTable[20106] = "DIN_66003"; // IA5 (German)
690
- hashTable[20107] = "SEN_850200_B"; // IA5 (Swedish)
691
- hashTable[50932] = "_autodetect"; // Japanese (Auto Select)
692
- hashTable[20108] = "NS_4551-1"; // IA5 (Norwegian)
693
- hashTable[50949] = "_autodetect_kr"; // Korean (Auto Select)
694
- hashTable[950] = "big5"; // Chinese Traditional (Big5)
695
- hashTable[50221] = "csISO2022JP"; // Japanese (JIS-Allow 1 byte Kana)
696
- hashTable[51949] = "euc-kr"; // Korean (EUC)
697
- hashTable[936] = "gb2312"; // Chinese Simplified (GB2312)
698
- hashTable[52936] = "hz-gb-2312"; // Chinese Simplified (HZ)
699
- hashTable[852] = "ibm852"; // Central European (DOS)
700
- hashTable[866] = "ibm866"; // Cyrillic Alphabet (DOS)
701
- hashTable[20105] = "irv"; // IA5 (IRV)
702
- hashTable[50220] = "iso-2022-jp"; // Japanese (JIS)
703
- hashTable[50222] = "iso-2022-jp"; // Japanese (JIS-Allow 1 byte Kana)
704
- hashTable[50225] = "iso-2022-kr"; // Korean (ISO)
705
- hashTable[28591] = "iso-8859-1"; // Western Alphabet (ISO)
706
- hashTable[28592] = "iso-8859-2"; // Central European Alphabet (ISO)
707
- hashTable[28593] = "iso-8859-3"; // Latin 3 Alphabet (ISO)
708
- hashTable[28594] = "iso-8859-4"; // Baltic Alphabet (ISO)
709
- hashTable[28595] = "iso-8859-5"; // Cyrillic Alphabet (ISO)
710
- hashTable[28596] = "iso-8859-6"; // Arabic Alphabet (ISO)
711
- hashTable[28597] = "iso-8859-7"; // Greek Alphabet (ISO)
712
- hashTable[28598] = "iso-8859-8"; // Hebrew Alphabet (ISO)
713
- hashTable[20866] = "koi8-r"; // Cyrillic Alphabet (KOI8-R)
714
- hashTable[949] = "ks_c_5601"; // Korean
715
- hashTable[932] = "shift-jis"; // Japanese (Shift-JIS)
716
- hashTable[1200] = "unicode"; // Universal Alphabet
717
- hashTable[1201] = "unicodeFEFF"; // Universal Alphabet (Big-Endian)
718
- hashTable[65000] = "utf-7"; // Universal Alphabet (UTF-7)
719
- hashTable[65001] = "utf-8"; // Universal Alphabet (UTF-8)
720
- hashTable[1250] = "windows-1250"; // Central European Alphabet (Windows)
721
- hashTable[1251] = "windows-1251"; // Cyrillic Alphabet (Windows)
722
- hashTable[1252] = "windows-1252"; // Western Alphabet (Windows)
723
- hashTable[1253] = "windows-1253"; // Greek Alphabet (Windows)
724
- hashTable[1254] = "windows-1254"; // Turkish Alphabet
725
- hashTable[1255] = "windows-1255"; // Hebrew Alphabet (Windows)
726
- hashTable[1256] = "windows-1256"; // Arabic Alphabet (Windows)
727
- hashTable[1257] = "windows-1257"; // Baltic Alphabet (Windows)
728
- hashTable[1258] = "windows-1258"; // Vietnamese Alphabet (Windows)
729
- hashTable[874] = "windows-874"; // Thai (Windows)
730
- hashTable[20127] = "US-ASCII"; // us-ascii
731
- hashTable[51932] = "x-euc"; // Japanese (EUC)
668
+ hashTable[20106] = "DIN_66003";
669
+ hashTable[20107] = "SEN_850200_B";
670
+ hashTable[50932] = "_autodetect";
671
+ hashTable[20108] = "NS_4551-1";
672
+ hashTable[50949] = "_autodetect_kr";
673
+ hashTable[950] = "big5";
674
+ hashTable[50221] = "csISO2022JP";
675
+ hashTable[51949] = "euc-kr";
676
+ hashTable[936] = "gb2312";
677
+ hashTable[52936] = "hz-gb-2312";
678
+ hashTable[852] = "ibm852";
679
+ hashTable[866] = "ibm866";
680
+ hashTable[20105] = "irv";
681
+ hashTable[50220] = "iso-2022-jp";
682
+ hashTable[50222] = "iso-2022-jp";
683
+ hashTable[50225] = "iso-2022-kr";
684
+ hashTable[28591] = "iso-8859-1";
685
+ hashTable[28592] = "iso-8859-2";
686
+ hashTable[28593] = "iso-8859-3";
687
+ hashTable[28594] = "iso-8859-4";
688
+ hashTable[28595] = "iso-8859-5";
689
+ hashTable[28596] = "iso-8859-6";
690
+ hashTable[28597] = "iso-8859-7";
691
+ hashTable[28598] = "iso-8859-8";
692
+ hashTable[20866] = "koi8-r";
693
+ hashTable[949] = "ks_c_5601";
694
+ hashTable[932] = "shift-jis";
695
+ hashTable[1200] = "unicode";
696
+ hashTable[1201] = "unicodeFEFF";
697
+ hashTable[65000] = "utf-7";
698
+ hashTable[65001] = "utf-8";
699
+ hashTable[1250] = "windows-1250";
700
+ hashTable[1251] = "windows-1251";
701
+ hashTable[1252] = "windows-1252";
702
+ hashTable[1253] = "windows-1253";
703
+ hashTable[1254] = "windows-1254";
704
+ hashTable[1255] = "windows-1255";
705
+ hashTable[1256] = "windows-1256";
706
+ hashTable[1257] = "windows-1257";
707
+ hashTable[1258] = "windows-1258";
708
+ hashTable[874] = "windows-874";
709
+ hashTable[20127] = "US-ASCII";
710
+ hashTable[51932] = "x-euc";
732
711
  return hashTable;
733
712
  };
734
- // return the name of encoding used
735
713
  Encoding.prototype.toString = function () {
736
714
  return this.label;
737
715
  };
@@ -742,12 +720,9 @@
742
720
  Encoding.Unicode = new Encoding("utf-16le");
743
721
  Encoding.CodePageToEncodingMap = Encoding.PopulateCodePageToEncodingMap();
744
722
 
745
- // Reference: https://github.com/rkostrzewski/hashtable-ts/blob/master/src/hashtable.ts
746
723
  var HashUtils = /** @class */ (function () {
747
724
  function HashUtils() {
748
725
  }
749
- // Pay attention that in server there is the same function and it must
750
- // return the same hash value.
751
726
  HashUtils.GetHashCode = function (str) {
752
727
  var bytes = null;
753
728
  bytes = Encoding.UTF8.GetBytes(str);
@@ -775,13 +750,12 @@
775
750
  return HashUtils;
776
751
  }());
777
752
  var HashTableLoadFactor = 0.75;
778
- // Hashtable implementation for key TKey and Value TValue
779
753
  var Hashtable = /** @class */ (function () {
780
754
  function Hashtable(bucketCount, loadFactor) {
781
755
  if (bucketCount === void 0) { bucketCount = 8; }
782
756
  if (loadFactor === void 0) { loadFactor = HashTableLoadFactor; }
783
- this._buckets = []; // total no. of buckets
784
- this._elementsCount = 0; // total elements
757
+ this._buckets = [];
758
+ this._elementsCount = 0;
785
759
  this._bucketCount = 0;
786
760
  this._loadFactor = 0;
787
761
  this._bucketCount = bucketCount;
@@ -790,7 +764,6 @@
790
764
  throw new Exception('Bucket count must be a positive number and be multiple of 2.');
791
765
  }
792
766
  }
793
- // Generic Hash funtion
794
767
  Hashtable.prototype.HashFunction = function (key) {
795
768
  if (typeof key.GetHashCode === 'function') {
796
769
  return key.GetHashCode();
@@ -804,7 +777,6 @@
804
777
  return 0;
805
778
  };
806
779
  Object.defineProperty(Hashtable.prototype, "Count", {
807
- // returns elementCount
808
780
  get: function () {
809
781
  return this._elementsCount;
810
782
  },
@@ -812,7 +784,6 @@
812
784
  configurable: true
813
785
  });
814
786
  Object.defineProperty(Hashtable.prototype, "Values", {
815
- // returns ValueCollection (Array Enumerator)
816
787
  get: function () {
817
788
  var array = [];
818
789
  this._buckets.forEach(function (b) { return b.forEach(function (item) {
@@ -824,7 +795,6 @@
824
795
  configurable: true
825
796
  });
826
797
  Object.defineProperty(Hashtable.prototype, "Keys", {
827
- // returns KeyCollection (Array Enumerator)
828
798
  get: function () {
829
799
  var array = [];
830
800
  this._buckets.forEach(function (b) { return b.forEach(function (item) {
@@ -835,15 +805,12 @@
835
805
  enumerable: false,
836
806
  configurable: true
837
807
  });
838
- // adds item to Hashtable
839
808
  Hashtable.prototype.Add = function (key, value) {
840
809
  this.Insert(key, value, true);
841
810
  };
842
- // sets item in Hashtable
843
811
  Hashtable.prototype.set_Item = function (key, value) {
844
812
  this.Insert(key, value, false);
845
813
  };
846
- // Insert element in Hashtable
847
814
  Hashtable.prototype.Insert = function (key, value, add) {
848
815
  var bucketIndex = this.GetBucketIndex(key);
849
816
  if (typeof this._buckets[bucketIndex] === "undefined") {
@@ -864,7 +831,6 @@
864
831
  this.Resize(this._bucketCount * 2);
865
832
  }
866
833
  };
867
- // Gets value for key TKey
868
834
  Hashtable.prototype.get_Item = function (key) {
869
835
  var bucketIndex = this.GetBucketIndex(key);
870
836
  var bucket = this._buckets[bucketIndex];
@@ -877,7 +843,6 @@
877
843
  }
878
844
  return null;
879
845
  };
880
- // Returns if key TKey is present in Hashtable
881
846
  Hashtable.prototype.ContainsKey = function (key) {
882
847
  var bucketIndex = this.GetBucketIndex(key);
883
848
  var bucket = this._buckets[bucketIndex];
@@ -887,7 +852,6 @@
887
852
  var itemIndex = bucket.findIndex(function (x) { return x.key === key; });
888
853
  return (itemIndex > -1);
889
854
  };
890
- // Removes item with key TKey from Hashtable
891
855
  Hashtable.prototype.Remove = function (key) {
892
856
  var bucketIndex = this.GetBucketIndex(key);
893
857
  var bucket = this._buckets[bucketIndex];
@@ -903,7 +867,6 @@
903
867
  }
904
868
  }
905
869
  };
906
- // Resize bucket (Hashtable)
907
870
  Hashtable.prototype.Resize = function (newBucketCount) {
908
871
  var _this = this;
909
872
  var _oldBuckets = this._buckets;
@@ -912,7 +875,6 @@
912
875
  this._bucketCount = newBucketCount;
913
876
  _oldBuckets.forEach(function (b) { return b.forEach(function (item) { return _this.Add(item.key, item.value); }); });
914
877
  };
915
- // returns bucketIndex for key
916
878
  Hashtable.prototype.GetBucketIndex = function (key) {
917
879
  var hash = this.HashFunction(key);
918
880
  if (hash % 1 !== 0) {
@@ -924,7 +886,6 @@
924
886
  }
925
887
  return index;
926
888
  };
927
- // Clears Hashtable
928
889
  Hashtable.prototype.Clear = function () {
929
890
  this._elementsCount = 0;
930
891
  this._buckets = [];
@@ -1039,7 +1000,7 @@
1039
1000
  List.prototype.Insert = function (index, item) {
1040
1001
  if (index >= 0 && index < this.length)
1041
1002
  this.splice(index, 0, item);
1042
- else if (index === this.length) // inserting at end means append
1003
+ else if (index === this.length)
1043
1004
  this.push(item);
1044
1005
  else
1045
1006
  throw new Error("index out of bounds");
@@ -1066,10 +1027,6 @@
1066
1027
  foundItem = null;
1067
1028
  return foundItem;
1068
1029
  };
1069
- /// <summary>
1070
- /// add null cells up to 'size' cells.
1071
- /// </summary>
1072
- /// <param name="size"></param>
1073
1030
  List.prototype.SetSize = function (size) {
1074
1031
  if (this.length > size) {
1075
1032
  this.RemoveRange(size, this.length - size);
@@ -1193,17 +1150,13 @@
1193
1150
  return NotImplementedException;
1194
1151
  }(Exception));
1195
1152
 
1153
+ exports.NumberStyles = void 0;
1196
1154
  (function (NumberStyles) {
1197
1155
  NumberStyles[NumberStyles["HexNumber"] = 0] = "HexNumber";
1198
1156
  })(exports.NumberStyles || (exports.NumberStyles = {}));
1199
1157
  var NNumber = /** @class */ (function () {
1200
1158
  function NNumber() {
1201
1159
  }
1202
- /// <summary>
1203
- /// convert a string to number
1204
- /// for blank string , it will return 0
1205
- /// for incorrect format it will return NaN
1206
- /// <summary>
1207
1160
  NNumber.Parse = function (text, style) {
1208
1161
  if (arguments.length === 2) {
1209
1162
  if (style === exports.NumberStyles.HexNumber)
@@ -1211,20 +1164,12 @@
1211
1164
  else
1212
1165
  throw new NotImplementedException();
1213
1166
  }
1214
- return +text; // use unary + operator to convert string to number.
1167
+ return +text;
1215
1168
  };
1216
- /// <summary>
1217
- /// convert a string to number
1218
- /// return true if string is correctly parsed i.e pvalue.value is number
1219
- /// for incorrect format it will return false
1220
- /// <summary>
1221
1169
  NNumber.TryParse = function (str, pvalue) {
1222
1170
  pvalue.value = +str;
1223
1171
  return !isNaN(pvalue.value);
1224
1172
  };
1225
- /// <summary>
1226
- /// convert a number to string with specified format
1227
- /// <summary>
1228
1173
  NNumber.ToString = function (num, format) {
1229
1174
  if (format === 'X2') {
1230
1175
  var res = num.toString(16);
@@ -1235,7 +1180,6 @@
1235
1180
  return NNumber;
1236
1181
  }());
1237
1182
 
1238
- // @dynamic
1239
1183
  var NString = /** @class */ (function () {
1240
1184
  function NString() {
1241
1185
  }
@@ -1286,7 +1230,7 @@
1286
1230
  for (i = 0, l = str.length; i < l; i++) {
1287
1231
  ch = str.charCodeAt(i);
1288
1232
  hash = ((hash << 5) - hash) + ch;
1289
- hash |= 0; // Convert to 32bit integer
1233
+ hash |= 0;
1290
1234
  }
1291
1235
  return hash;
1292
1236
  };
@@ -1341,17 +1285,14 @@
1341
1285
  var lenA = strA.length;
1342
1286
  var lenB = strB.length;
1343
1287
  var len = Math.min(lenA, lenB);
1344
- // compare character by character
1345
1288
  for (var i = 0; i < len; i++) {
1346
1289
  if (strA[i].charCodeAt(0) !== strB[i].charCodeAt(0)) {
1347
1290
  return strA[i].charCodeAt(0) - strB[i].charCodeAt(0);
1348
1291
  }
1349
1292
  }
1350
- // if all characters are same , but length is different return the difference of length
1351
1293
  if (lenA !== lenB) {
1352
1294
  return lenA - lenB;
1353
1295
  }
1354
- // all chars are same , so strings are equal
1355
1296
  return 0;
1356
1297
  };
1357
1298
  NString.PadRight = function (source, maxLength, fillString) {
@@ -1367,8 +1308,6 @@
1367
1308
  };
1368
1309
  NString.Replace = function (str, orgSubStr, newSubStr) {
1369
1310
  var resultStr = '';
1370
- // fixed defect 151810: replace "*" with "\*" before we update the string so * will be as char and not reg exp
1371
- // also for special chars $ ^ . ? + , [
1372
1311
  orgSubStr = orgSubStr.replace(new RegExp("\\\\", 'g'), "\\\\");
1373
1312
  orgSubStr = orgSubStr.replace(new RegExp("\\*", 'g'), "\\\*");
1374
1313
  orgSubStr = orgSubStr.replace(new RegExp("\\$", 'g'), "\\\$");
@@ -1395,7 +1334,7 @@
1395
1334
  function NumberFormatInfo() {
1396
1335
  }
1397
1336
  NumberFormatInfo.GetLocaleDecimalSeperator = function () {
1398
- return (1.1).toLocaleString()[1]; // get the decimal seperator of current locale
1337
+ return (1.1).toLocaleString()[1];
1399
1338
  };
1400
1339
  return NumberFormatInfo;
1401
1340
  }());
@@ -1444,12 +1383,10 @@
1444
1383
  return Stack;
1445
1384
  }());
1446
1385
 
1447
- // StackFrame uses StackTrace utility using stacktrace-js utility from npm
1448
- // https://www.npmjs.com/package/stacktrace-js
1449
1386
  var StackFrame = /** @class */ (function () {
1450
1387
  function StackFrame(skipFrames, fNeedFileInfo) {
1451
1388
  this.stackFrame = null;
1452
- var stackFrames = StackTrace$1.getSync();
1389
+ var stackFrames = StackTrace__namespace.getSync();
1453
1390
  if (skipFrames < 0 || skipFrames >= stackFrames.length)
1454
1391
  throw new Error("Argument out of range");
1455
1392
  this.stackFrame = stackFrames[skipFrames];
@@ -1460,38 +1397,23 @@
1460
1397
  return StackFrame;
1461
1398
  }());
1462
1399
 
1463
- // This uses StackTrace utility using stacktrace-js utility from npm. Use this in package.json
1464
- // https://www.npmjs.com/package/stacktrace-js
1465
1400
  var StackTrace = /** @class */ (function () {
1466
1401
  function StackTrace() {
1467
1402
  }
1468
1403
  StackTrace.prototype.GetFrames = function () {
1469
- // Using getSync() method, it returns references of callstack ethod from the javascript files bindled and not typeScript file from sources.
1470
- // However, if aSync method would have used, it overcomes above problems but the call to log would have been async and we would not have
1471
- // received synchronous logs which would be confusing.
1472
- return StackTrace$1.getSync();
1404
+ return StackTrace__namespace.getSync();
1473
1405
  };
1474
1406
  return StackTrace;
1475
1407
  }());
1476
1408
 
1477
- // StringBuilder class. Its Implementation currently uses string object. It could have been string[], but it has issues when inserting string.
1478
- // It would not have served purpose while inserting a string. Other could be to use string[] with one chraracter per string. Even its utility
1479
- // is doubtful as while manipulation, it would be creting new objects instead pointers. So for now we have used only string and see if we have
1480
- // any performance issues.
1481
1409
  var StringBuilder = /** @class */ (function () {
1482
1410
  function StringBuilder(valueOrLength, length) {
1483
1411
  this.part = "";
1484
1412
  if (arguments.length > 0) {
1485
1413
  if (valueOrLength != null && valueOrLength.constructor === Number) {
1486
- // TODO: Very low priority performance improvement - Implement this.
1487
- // Debug.Assert(false, "StringBuilder: NotImplemented constructor with initial length/capacity");
1488
- // throw new Error("NotImplemented constructor with initial length/capacity");
1489
1414
  }
1490
1415
  else if (valueOrLength != null && valueOrLength.constructor === String) {
1491
1416
  this.part = valueOrLength.toString();
1492
- // TODO: Very low priority performance improvement - Implement this.
1493
- // if (arguments.length === 2)
1494
- // Debug.Assert(false, "NotImplemented constructor with initial length/capacity");
1495
1417
  }
1496
1418
  }
1497
1419
  }
@@ -1512,20 +1434,17 @@
1512
1434
  this.AppendNumber(textOrNum, startIndexOrNumberOfCharacters);
1513
1435
  return this;
1514
1436
  };
1515
- // Append string
1516
1437
  StringBuilder.prototype.AppendString = function (text, startIndex, charCount) {
1517
1438
  if (startIndex === void 0) { startIndex = 0; }
1518
1439
  if (charCount === void 0) { charCount = text.length; }
1519
1440
  this.part = this.part + text.substr(startIndex, charCount);
1520
1441
  };
1521
- // Append Number
1522
1442
  StringBuilder.prototype.AppendNumber = function (num, numberOfCharacters) {
1523
1443
  if (numberOfCharacters === void 0) { numberOfCharacters = 1; }
1524
1444
  if (numberOfCharacters <= 0)
1525
1445
  throw new Error("numberOfCharacters cannot be less than or equal to zero");
1526
1446
  this.part = this.part + num.toString().repeat(numberOfCharacters);
1527
1447
  };
1528
- // Append Line
1529
1448
  StringBuilder.prototype.AppendLine = function (text) {
1530
1449
  if (text === void 0) { text = null; }
1531
1450
  if (text !== null)
@@ -1600,7 +1519,6 @@
1600
1519
  }
1601
1520
  return this;
1602
1521
  };
1603
- // return the string
1604
1522
  StringBuilder.prototype.toString = function () {
1605
1523
  return this.ToString();
1606
1524
  };
@@ -1612,10 +1530,6 @@
1612
1530
  this.ManagedThreadId = 0;
1613
1531
  this.ManagedThreadId = Thread.nextId++;
1614
1532
  }
1615
- /// <summary>
1616
- /// Free the thread so it will be able to do other work, like gui events
1617
- /// </summary>
1618
- /// <param name = "millisecondsTimeout"> timeout in milliseconds</param>
1619
1533
  Thread.Sleep = function (millisecondsTimeout) {
1620
1534
  return __awaiter(this, void 0, void 0, function () {
1621
1535
  return __generator(this, function (_a) {
@@ -1651,17 +1565,12 @@
1651
1565
  var XmlConvert = /** @class */ (function () {
1652
1566
  function XmlConvert() {
1653
1567
  }
1654
- // TODO : Implement
1655
1568
  XmlConvert.EncodeName = function (name) {
1656
1569
  throw new NotImplementedException();
1657
1570
  };
1658
1571
  return XmlConvert;
1659
1572
  }());
1660
1573
 
1661
- /**
1662
- * Generated bundle index. Do not edit.
1663
- */
1664
-
1665
1574
  exports.$$ = $$;
1666
1575
  exports.$0 = $0;
1667
1576
  exports.$9 = $9;
@@ -1758,5 +1667,5 @@
1758
1667
 
1759
1668
  Object.defineProperty(exports, '__esModule', { value: true });
1760
1669
 
1761
- })));
1670
+ }));
1762
1671
  //# sourceMappingURL=magic-xpa-mscorelib.umd.js.map