ListFormatConstructor.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using Jint.Native.Function;
  2. using Jint.Native.Object;
  3. using Jint.Runtime;
  4. using Jint.Runtime.Descriptors;
  5. namespace Jint.Native.Intl;
  6. /// <summary>
  7. /// https://tc39.es/ecma402/#sec-intl-listformat-constructor
  8. /// </summary>
  9. internal sealed class ListFormatConstructor : Constructor
  10. {
  11. private static readonly JsString _functionName = new("ListFormat");
  12. public ListFormatConstructor(
  13. Engine engine,
  14. Realm realm,
  15. FunctionPrototype functionPrototype,
  16. ObjectPrototype objectPrototype) : base(engine, realm, _functionName)
  17. {
  18. _prototype = functionPrototype;
  19. PrototypeObject = new ListFormatPrototype(engine, realm, this, objectPrototype);
  20. _length = new PropertyDescriptor(JsNumber.PositiveZero, PropertyFlag.Configurable);
  21. _prototypeDescriptor = new PropertyDescriptor(PrototypeObject, PropertyFlag.AllForbidden);
  22. }
  23. public ListFormatPrototype PrototypeObject { get; }
  24. public override ObjectInstance Construct(JsValue[] arguments, JsValue newTarget)
  25. {
  26. throw new NotImplementedException();
  27. }
  28. }