|
| 1 | +using CSharpToJavaScript.Utils; |
| 2 | +using System; |
| 3 | +using System.Buffers; |
| 4 | +using System.Collections; |
| 5 | +using System.Collections.Generic; |
| 6 | +using System.Linq; |
| 7 | +using System.Reflection; |
| 8 | +using System.Text; |
| 9 | +using System.Text.RegularExpressions; |
| 10 | +using System.Threading.Tasks; |
| 11 | + |
| 12 | +namespace CSharpToJavaScript.APIs.JS |
| 13 | +{ |
| 14 | + //https://262.ecma-international.org/14.0/#sec-string-objects |
| 15 | + [To(ToAttribute.Default)] |
| 16 | + public partial class String : StringPrototype |
| 17 | + { |
| 18 | + public dynamic Value { get; set; } |
| 19 | + |
| 20 | + public static implicit operator String(string value) { return new String(value) { Value = value }; } |
| 21 | + public static implicit operator string(String value) { return new String(value) { Value = value }; } |
| 22 | + |
| 23 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 24 | + public StringPrototype Prototype { get; } = new(); |
| 25 | + |
| 26 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 27 | + public int Length { get; } = 0; |
| 28 | + |
| 29 | + [To(ToAttribute.Default)] |
| 30 | + public String(string value = "") { } |
| 31 | + |
| 32 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 33 | + public static string FromCharCode(params Number[] codeUnits) |
| 34 | + { |
| 35 | + throw new System.NotImplementedException(); |
| 36 | + } |
| 37 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 38 | + public static string FromCodePoint(params Number[] codePoints) |
| 39 | + { |
| 40 | + throw new System.NotImplementedException(); |
| 41 | + } |
| 42 | + //TODO template |
| 43 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 44 | + public static string Raw(dynamic template, params string[] substitutions) |
| 45 | + { |
| 46 | + throw new System.NotImplementedException(); |
| 47 | + } |
| 48 | + |
| 49 | + } |
| 50 | + |
| 51 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 52 | + public partial class StringPrototype : FunctionPrototype |
| 53 | + { |
| 54 | + public StringPrototype() { } |
| 55 | + |
| 56 | + public int At(int index) |
| 57 | + { |
| 58 | + throw new System.NotImplementedException(); |
| 59 | + } |
| 60 | + public string CharAt(int pos) |
| 61 | + { |
| 62 | + throw new System.NotImplementedException(); |
| 63 | + } |
| 64 | + public int CharCodeAt(int pos) |
| 65 | + { |
| 66 | + throw new System.NotImplementedException(); |
| 67 | + } |
| 68 | + public int CodePointAt(int pos) |
| 69 | + { |
| 70 | + throw new System.NotImplementedException(); |
| 71 | + } |
| 72 | + public string Concat(params string[] args ) |
| 73 | + { |
| 74 | + throw new System.NotImplementedException(); |
| 75 | + } |
| 76 | + public bool EndsWith(string searchString, int endPosition = 0 ) |
| 77 | + { |
| 78 | + throw new System.NotImplementedException(); |
| 79 | + } |
| 80 | + public bool Includes(string searchString, int position = 0 ) |
| 81 | + { |
| 82 | + throw new System.NotImplementedException(); |
| 83 | + } |
| 84 | + public bool IndexOf(string searchString, int position = 0 ) |
| 85 | + { |
| 86 | + throw new System.NotImplementedException(); |
| 87 | + } |
| 88 | + public bool LastIndexOf(string searchString, int position = 0 ) |
| 89 | + { |
| 90 | + throw new System.NotImplementedException(); |
| 91 | + } |
| 92 | + public int LocaleCompare(string that, dynamic reserved1 = null, dynamic reserved2 = null ) |
| 93 | + { |
| 94 | + throw new System.NotImplementedException(); |
| 95 | + } |
| 96 | + public dynamic[] Match(RegExp regexp) |
| 97 | + { |
| 98 | + throw new System.NotImplementedException(); |
| 99 | + } |
| 100 | + public dynamic[] MatchAll(RegExp regexp ) |
| 101 | + { |
| 102 | + throw new System.NotImplementedException(); |
| 103 | + } |
| 104 | + public string Normalize(string form = "NFC") |
| 105 | + { |
| 106 | + throw new System.NotImplementedException(); |
| 107 | + } |
| 108 | + public string PadEnd(int maxLength, string fillString = "" ) |
| 109 | + { |
| 110 | + throw new System.NotImplementedException(); |
| 111 | + } |
| 112 | + public string PadStart(int maxLength, string fillString = "") |
| 113 | + { |
| 114 | + throw new System.NotImplementedException(); |
| 115 | + } |
| 116 | + public string Repeat(int count ) |
| 117 | + { |
| 118 | + throw new System.NotImplementedException(); |
| 119 | + } |
| 120 | + public string Replace(string searchValue, string replaceValue ) |
| 121 | + { |
| 122 | + throw new System.NotImplementedException(); |
| 123 | + } |
| 124 | + public string ReplaceAll(string searchValue, string replaceValue ) |
| 125 | + { |
| 126 | + throw new System.NotImplementedException(); |
| 127 | + } |
| 128 | + public int Search(Regex regexp ) |
| 129 | + { |
| 130 | + throw new System.NotImplementedException(); |
| 131 | + } |
| 132 | + public string Slice(int start,int end ) |
| 133 | + { |
| 134 | + throw new System.NotImplementedException(); |
| 135 | + } |
| 136 | + public string[] Split(string separator, int limit = 0) |
| 137 | + { |
| 138 | + throw new System.NotImplementedException(); |
| 139 | + } |
| 140 | + public bool StartsWith(string searchString, int position = 0 ) |
| 141 | + { |
| 142 | + throw new System.NotImplementedException(); |
| 143 | + } |
| 144 | + public string Substring(int start,int end = 0) |
| 145 | + { |
| 146 | + throw new System.NotImplementedException(); |
| 147 | + } |
| 148 | + public string ToLocaleLowerCase(dynamic reserved1 = null, dynamic reserved2 = null) |
| 149 | + { |
| 150 | + throw new System.NotImplementedException(); |
| 151 | + } |
| 152 | + public string ToLocaleUpperCase(dynamic reserved1 = null, dynamic reserved2 = null) |
| 153 | + { |
| 154 | + throw new System.NotImplementedException(); |
| 155 | + } |
| 156 | + public string ToLowerCase() |
| 157 | + { |
| 158 | + throw new System.NotImplementedException(); |
| 159 | + } |
| 160 | + public string ToString() |
| 161 | + { |
| 162 | + throw new System.NotImplementedException(); |
| 163 | + } |
| 164 | + public string ToUpperCase() |
| 165 | + { |
| 166 | + throw new System.NotImplementedException(); |
| 167 | + } |
| 168 | + public string Trim() |
| 169 | + { |
| 170 | + throw new System.NotImplementedException(); |
| 171 | + } |
| 172 | + public string TrimEnd() |
| 173 | + { |
| 174 | + throw new System.NotImplementedException(); |
| 175 | + } |
| 176 | + public string TrimStart() |
| 177 | + { |
| 178 | + throw new System.NotImplementedException(); |
| 179 | + } |
| 180 | + public String ValueOf() |
| 181 | + { |
| 182 | + throw new System.NotImplementedException(); |
| 183 | + } |
| 184 | + } |
| 185 | +} |
0 commit comments