From ff8ac3b98688eee989af9575f5f19e0572542ce8 Mon Sep 17 00:00:00 2001 From: Pavel Savara Date: Mon, 3 Oct 2022 13:00:05 +0200 Subject: [PATCH] [wasm] add missing API xml doc (#76196) * add missing xml doc Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com> --- ...stem.Runtime.InteropServices.JavaScript.cs | 1 + .../InteropServices/JavaScript/JSException.cs | 2 +- .../JavaScript/JSExportAttribute.cs | 8 +- .../JavaScript/JSFunctionBinding.cs | 19 ++- .../InteropServices/JavaScript/JSHost.cs | 6 +- .../JavaScript/JSImportAttribute.cs | 19 ++- .../JavaScript/JSMarshalAsAttribute.cs | 4 +- .../JavaScript/JSMarshalerType.cs | 110 +++++++++++++----- .../InteropServices/JavaScript/JSObject.cs | 30 ++++- .../InteropServices/JavaScript/JSType.cs | 42 ++++--- .../JavaScript/Legacy/Array.cs | 12 +- .../JavaScript/Legacy/ArrayBuffer.cs | 2 +- .../JavaScript/Legacy/Runtime.cs | 4 +- .../JSMarshalerArgument.BigInt64.cs | 4 + .../Marshaling/JSMarshalerArgument.Bool.cs | 4 + .../Marshaling/JSMarshalerArgument.Byte.cs | 12 +- .../Marshaling/JSMarshalerArgument.Char.cs | 4 + .../JSMarshalerArgument.DateTime.cs | 8 ++ .../Marshaling/JSMarshalerArgument.Double.cs | 12 +- .../JSMarshalerArgument.Exception.cs | 2 + .../Marshaling/JSMarshalerArgument.Func.cs | 80 +++++++++++++ .../Marshaling/JSMarshalerArgument.Int16.cs | 4 + .../Marshaling/JSMarshalerArgument.Int32.cs | 12 +- .../Marshaling/JSMarshalerArgument.Int52.cs | 4 + .../Marshaling/JSMarshalerArgument.IntPtr.cs | 6 + .../JSMarshalerArgument.JSObject.cs | 4 + .../Marshaling/JSMarshalerArgument.Object.cs | 4 + .../Marshaling/JSMarshalerArgument.Single.cs | 4 + .../Marshaling/JSMarshalerArgument.String.cs | 4 + .../Marshaling/JSMarshalerArgument.Task.cs | 24 +++- 30 files changed, 370 insertions(+), 81 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs index c910e7f8228c5..d13c24cf0b931 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/ref/System.Runtime.InteropServices.JavaScript.cs @@ -152,6 +152,7 @@ public static class JSHost [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed class JSFunctionBinding { + internal JSFunctionBinding() { throw null; } public static void InvokeJS(JSFunctionBinding signature, Span arguments) { throw null; } public static JSFunctionBinding BindJSFunction(string functionName, string moduleName, ReadOnlySpan signatures) { throw null; } public static JSFunctionBinding BindManagedFunction(string fullyQualifiedName, int signatureHash, ReadOnlySpan signatures) { throw null; } diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSException.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSException.cs index de5715f99cda1..d063ce81c1f85 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSException.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSException.cs @@ -6,7 +6,7 @@ namespace System.Runtime.InteropServices.JavaScript { /// - /// Represents an Exception initiated from the JavaScript interop code. + /// Represents an exception initiated from the JavaScript interop code. /// [SupportedOSPlatform("browser")] // @kg: Do we really need to platform-lock JSException? public sealed class JSException : Exception diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSExportAttribute.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSExportAttribute.cs index 1a076afe69621..9d33f59fdf9ef 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSExportAttribute.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSExportAttribute.cs @@ -6,12 +6,12 @@ namespace System.Runtime.InteropServices.JavaScript { /// - /// Attribute used to indicate a source generator should export a method to JavaScript and create thunks necessary to marshal its arguments along with any return value or thrown exception. - /// For marshaling arguments of complex types . + /// Indicates that a source generator should export the attributed method to JavaScript and create thunks necessary to marshal its arguments and any return value or thrown exception. /// /// + /// For marshaling arguments of complex types . /// This attribute is meaningless if the source generator associated with it is not enabled. - /// The current built-in source generator only supports C# and only supplies an implementation when + /// The current built-in source generator only supports C# and only supplies an implementation when applied to static, non-partial, or non-generic methods. /// applied to static, non-partial, non-generic methods. /// Exported methods cannot be trimmed by the linker. /// @@ -20,7 +20,7 @@ namespace System.Runtime.InteropServices.JavaScript public sealed class JSExportAttribute : Attribute { /// - /// Initializes a new instance of the . + /// Initializes a new instance of the class. /// public JSExportAttribute() { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSFunctionBinding.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSFunctionBinding.cs index a7c099a5aa8f8..0b8ce881ba57f 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSFunctionBinding.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSFunctionBinding.cs @@ -15,8 +15,13 @@ namespace System.Runtime.InteropServices.JavaScript [CLSCompliant(false)] [SupportedOSPlatform("browser")] [EditorBrowsable(EditorBrowsableState.Never)] - public sealed partial class JSFunctionBinding + public sealed class JSFunctionBinding { + /// + /// This API supports JSImport infrastructure and is not intended to be used directly from your code. + /// + internal JSFunctionBinding() { } + #region intentionally opaque internal structure internal unsafe JSBindingHeader* Header; internal unsafe JSBindingType* Sigs;// points to first arg, not exception, not result @@ -118,6 +123,8 @@ internal unsafe JSBindingType this[int position] /// Invokes a previously bound JavaScript function using the provided span to transport argument and return values. /// This API supports JSImport infrastructure and is not intended to be used directly from your code. /// + /// Generated metadata about the method signature used for marshaling. + /// The intermediate buffer with marshalled arguments. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void InvokeJS(JSFunctionBinding signature, Span arguments) { @@ -128,6 +135,11 @@ public static void InvokeJS(JSFunctionBinding signature, Span + /// The name of the exported JavaScript function. + /// The name of the ES6 module. + /// The metadata about the signature of the marshaled parameters. + /// The method metadata. + /// The method is executed on an architecture other than WebAssembly. // JavaScriptExports need to be protected from trimming because they are used from C/JS code which IL linker can't see [DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, "System.Runtime.InteropServices.JavaScript.JavaScriptExports", "System.Runtime.InteropServices.JavaScript")] // TODO make this DynamicDependency conditional @@ -144,6 +156,11 @@ public static JSFunctionBinding BindJSFunction(string functionName, string modul /// Binds a specific managed function wrapper so that it can later be invoked by JavaScript callers. /// This API supports JSImport infrastructure and is not intended to be used directly from your code. /// + /// The fully qualified name of the exported method. + /// The hash of the signature metadata. + /// The metadata about the signature of the marshaled parameters. + /// The method metadata. + /// The method is executed on architecture other than WebAssembly. public static JSFunctionBinding BindManagedFunction(string fullyQualifiedName, int signatureHash, ReadOnlySpan signatures) { if (RuntimeInformation.OSArchitecture != Architecture.Wasm) diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs index b549ceb7f8542..e7083dd75366a 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs @@ -15,7 +15,7 @@ namespace System.Runtime.InteropServices.JavaScript public static partial class JSHost { /// - /// Returns a proxy for the globalThis JavaScript host object. + /// Returns a proxy for the globalThis JavaScript host object. /// public static JSObject GlobalThis { @@ -37,8 +37,8 @@ public static JSObject DotnetInstance } /// - /// Download and instantiate an ES6 module from the provided URL, via the JavaScript host's dynamic import API. - /// If a module with the provided has previously been instantiated, it will be returned instead. + /// Downloads and instantiates an ES6 module from the provided URL, via the JavaScript host's dynamic import API. + /// If a module with the provided has previously been instantiated, it will be returned instead. /// /// Globally unique identifier of the ES6 module, which is used by . /// The location of the module file. diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSImportAttribute.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSImportAttribute.cs index 2fe067921fb7a..1139e8c739d03 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSImportAttribute.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSImportAttribute.cs @@ -7,12 +7,11 @@ namespace System.Runtime.InteropServices.JavaScript { /// /// Indicates that the JSImport source generator should create a managed wrapper to invoke a specific imported JavaScript function and marshal its arguments, return values, and exceptions. - /// To configure the marshaling behavior for specific values, . + /// To configure the marshalling behavior for specific values, . /// /// /// This attribute is meaningless if the source generator associated with it is not enabled. - /// The current built-in source generator only supports C# and only supplies an implementation when - /// applied to static, partial, non-generic methods. + /// The current built-in source generator only supports C# and only supplies an implementation when applied to static, partial, non-generic methods. /// /// /// @@ -29,34 +28,34 @@ namespace System.Runtime.InteropServices.JavaScript public sealed class JSImportAttribute : Attribute { /// - /// The name of the target JavaScript function. This name will be used as a key to locate the function in the module. - /// Functions nested inside of objects can be referred to by using the dot operator to connect one or more names. + /// Gets the name of the target JavaScript function. This name will be used as a key to locate the function in the module. /// + /// Functions nested inside of objects can be referred to by using the dot operator to connect one or more names. public string FunctionName { get; } /// - /// Globally unique identifier of the ES6 module, if any, that contains the function. The module must be loaded via before any attempt to invoke the function. + /// Gets the globally unique identifier of the ES6 module, if any, that contains the function. The module must be loaded via before any attempt to invoke the function. /// public string? ModuleName { get; } /// - /// Initializes a new instance of the . + /// Initializes a new instance of the class. /// - /// Name of the function to be bound in the module. It allows dots for nested objects. + /// The name of the function to be bound in the module. Use dots for nested objects. public JSImportAttribute(string functionName) { FunctionName = functionName; } /// - /// Initializes a new instance of the . + /// Initializes a new instance of the class. /// /// /// The name of the target JavaScript function. This name will be used as a key to locate the function in the module. /// Functions nested inside of objects can be referred to by using the dot operator to connect one or more names. /// /// - /// Globally unique identifier of the ES6 module, if any, that contains the function. The module must be loaded via before any attempt to invoke the function. + /// Globally unique identifier of the ES6 module, if any, that contains the function. The module must be loaded via before any attempt to invoke the function. /// public JSImportAttribute(string functionName, string moduleName) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalAsAttribute.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalAsAttribute.cs index 798e235d7f387..bea4adf675b55 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalAsAttribute.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalAsAttribute.cs @@ -9,7 +9,7 @@ namespace System.Runtime.InteropServices.JavaScript /// Specifies the JavaScript type associated with a managed argument or return value. /// The JSImport generator will use this information to marshal data between the JavaScript and managed environments. /// - /// One of the types defined in , for example + /// One of the types defined in , for example . /// /// /// [JSImport("createFunction", "my-math-helper")] @@ -22,7 +22,7 @@ namespace System.Runtime.InteropServices.JavaScript public sealed class JSMarshalAsAttribute : Attribute where T : JSType { /// - /// Create a configured by generic parameters of . + /// Initializes a new instance of configured by generic parameters of . /// public JSMarshalAsAttribute() { } } diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalerType.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalerType.cs index f7483d4e76b77..c9e08c31c8ad4 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalerType.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSMarshalerType.cs @@ -7,8 +7,8 @@ namespace System.Runtime.InteropServices.JavaScript { /// - /// Represents type metadata about marshaler, which are necessary for marshaling function arguments. - /// It's used by JSImport code generator and should not be used by developers in source code. + /// Represents type metadata about the marshaller that are necessary for marshalling function arguments. + /// This API is used by the JSImport code generator and should not be used by developers in source code. /// [SupportedOSPlatform("browser")] [EditorBrowsable(EditorBrowsableState.Never)] @@ -29,6 +29,7 @@ private JSMarshalerType(JSFunctionBinding.JSBindingType signatureType) /// /// Marshaling validates that the JavaScript function returned undefined value. /// + /// The marshaler metadata. public static JSMarshalerType Void { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Void @@ -37,38 +38,43 @@ private JSMarshalerType(JSFunctionBinding.JSBindingType signatureType) /// /// Marshaling ignores result of the JavaScript function. /// + /// The marshaler metadata. public static JSMarshalerType Discard { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Discard }); /// - /// Marshal as JavaScript Boolean type. + /// Marshal as JavaScript Boolean type. /// + /// The marshaler metadata. public static JSMarshalerType Boolean { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Boolean }); /// - /// Marshal as JavaScript Number via Uint8Array. + /// Marshal as JavaScript Number via Uint8Array. /// + /// The marshaler metadata. public static JSMarshalerType Byte { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Byte }); /// - /// Marshal as JavaScript String one character long. + /// Marshal as JavaScript String one character long. /// + /// The marshaler metadata. public static JSMarshalerType Char { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Char }); /// - /// Marshal as JavaScript Number via Int16Array. + /// Marshal as JavaScript Number via Int16Array. /// + /// The marshaler metadata. public static JSMarshalerType Int16 { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Int16 @@ -76,8 +82,9 @@ private JSMarshalerType(JSFunctionBinding.JSBindingType signatureType) /// - /// Marshal as JavaScript Number via Int32Array. + /// Marshal as JavaScript Number via Int32Array. /// + /// The marshaler metadata. public static JSMarshalerType Int32 { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Int32 @@ -86,46 +93,52 @@ private JSMarshalerType(JSFunctionBinding.JSBindingType signatureType) /// /// Marshal as JavaScript Number within -9007199254740991 and 9007199254740991 range. /// + /// The marshaler metadata. public static JSMarshalerType Int52 { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Int52 }); /// - /// Marshal as JavaScript BigInt. + /// Marshal as JavaScript BigInt. /// + /// The marshaler metadata. public static JSMarshalerType BigInt64 { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.BigInt64 }); /// - /// Marshal as JavaScript Number. + /// Marshal as JavaScript Number. /// + /// The marshaler metadata. public static JSMarshalerType Double { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Double }); /// - /// Marshal as JavaScript Number. + /// Marshal as JavaScript Number. /// + /// The marshaler metadata. public static JSMarshalerType Single { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Single }); /// - /// Marshal as JavaScript Number. + /// Marshal as JavaScript Number. /// + /// The marshaler metadata. public static JSMarshalerType IntPtr { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.IntPtr }); /// - /// Marshal as JavaScript Object or it's JSObject proxy on managed side. + /// Marshal as JavaScript Object or its JSObject proxy on managed side. /// + /// The marshaler metadata. public static JSMarshalerType JSObject { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.JSObject @@ -134,43 +147,53 @@ private JSMarshalerType(JSFunctionBinding.JSBindingType signatureType) /// /// Dynamic marshal as best fit. For maps to ManagedObject proxy on JavaScript side. /// + /// The marshaler metadata. public static JSMarshalerType Object { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Object }); /// - /// Marshal as JavaScript String. + /// Marshal as JavaScript String. /// + /// The marshaler metadata. public static JSMarshalerType String { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.String }); /// - /// Marshal as JavaScript Error. + /// Marshal as JavaScript Error. /// + /// The marshaler metadata. public static JSMarshalerType Exception { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.Exception }); /// - /// Marshal as JavaScript Date. + /// Marshal as JavaScript Date. /// + /// The marshaler metadata. public static JSMarshalerType DateTime { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.DateTime }); /// - /// Marshal as JavaScript Date. + /// Marshal as JavaScript Date. /// + /// The marshaler metadata. public static JSMarshalerType DateTimeOffset { get; } = new JSMarshalerType(new JSFunctionBinding.JSBindingType { Type = MarshalerType.DateTimeOffset }); + /// + /// Marshal as JavaScript underlying primitive type. + /// + /// Underlying primitive type. + /// The marshaler metadata. public static JSMarshalerType Nullable(JSMarshalerType primitive) { CheckNullable(primitive); @@ -187,16 +210,19 @@ public static JSMarshalerType Nullable(JSMarshalerType primitive) }); /// - /// Marshal as JavaScript Promise. + /// Marshal as JavaScript Promise. /// + /// The marshaler metadata. public static JSMarshalerType Task() { return _task; } /// - /// Marshal as JavaScript Promise. + /// Marshal as JavaScript Promise. /// + /// The marshaler metadata. + /// Metadata about the type of the result value. public static JSMarshalerType Task(JSMarshalerType result) { CheckTask(result); @@ -208,8 +234,10 @@ public static JSMarshalerType Task(JSMarshalerType result) } /// - /// Marshal as JavaScript Array. + /// Marshal as JavaScript Array. /// + /// Metadata about the type of the array element. + /// The marshaler metadata. public static JSMarshalerType Array(JSMarshalerType element) { CheckArray(element); @@ -226,6 +254,8 @@ public static JSMarshalerType Array(JSMarshalerType element) /// /// ArraySegment will hold to underlying array until disposed or garbage collected on JS side. /// + /// Metadata about the type of the array element. + /// The marshaler metadata. public static JSMarshalerType ArraySegment(JSMarshalerType element) { CheckArraySegment(element); @@ -240,6 +270,8 @@ public static JSMarshalerType ArraySegment(JSMarshalerType element) /// Marshal as instance of Span class on JavaScript side. /// /// Marshaler is not pinning the data, caller is responsible for doing that. + /// Metadata about the type of the span element. + /// The marshaler metadata. public static JSMarshalerType Span(JSMarshalerType element) { CheckArraySegment(element); @@ -256,16 +288,19 @@ public static JSMarshalerType Span(JSMarshalerType element) }); /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// The marshaler metadata. public static JSMarshalerType Action() { return _action; } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the first argument of the . + /// The marshaler metadata. public static JSMarshalerType Action(JSMarshalerType arg1) { CheckTask(arg1); @@ -277,8 +312,11 @@ public static JSMarshalerType Action(JSMarshalerType arg1) } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the first argument of the . + /// Metadata about the type of the second argument of the . + /// The marshaler metadata. public static JSMarshalerType Action(JSMarshalerType arg1, JSMarshalerType arg2) { CheckTask(arg1); @@ -292,8 +330,12 @@ public static JSMarshalerType Action(JSMarshalerType arg1, JSMarshalerType arg2) } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the first argument of the . + /// Metadata about the type of the second argument of the . + /// Metadata about the type of the third argument of the . + /// The marshaler metadata. public static JSMarshalerType Action(JSMarshalerType arg1, JSMarshalerType arg2, JSMarshalerType arg3) { CheckTask(arg1); @@ -309,8 +351,10 @@ public static JSMarshalerType Action(JSMarshalerType arg1, JSMarshalerType arg2, } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the result of the . + /// The marshaler metadata. public static JSMarshalerType Function(JSMarshalerType result) { CheckTask(result); @@ -322,8 +366,11 @@ public static JSMarshalerType Function(JSMarshalerType result) } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the first argument of the . + /// Metadata about the type of the result of the . + /// The marshaler metadata. public static JSMarshalerType Function(JSMarshalerType arg1, JSMarshalerType result) { CheckTask(arg1); @@ -337,8 +384,12 @@ public static JSMarshalerType Function(JSMarshalerType arg1, JSMarshalerType res } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the first argument of the . + /// Metadata about the type of the second argument of the . + /// Metadata about the type of the result of the . + /// The marshaler metadata. public static JSMarshalerType Function(JSMarshalerType arg1, JSMarshalerType arg2, JSMarshalerType result) { CheckTask(arg1); @@ -354,8 +405,13 @@ public static JSMarshalerType Function(JSMarshalerType arg1, JSMarshalerType arg } /// - /// Marshal as JavaScript Function. + /// Marshal as JavaScript Function. /// + /// Metadata about the type of the first argument of the . + /// Metadata about the type of the second argument of the . + /// Metadata about the type of the third argument of the . + /// Metadata about the type of the result of the . + /// The marshaler metadata. public static JSMarshalerType Function(JSMarshalerType arg1, JSMarshalerType arg2, JSMarshalerType arg3, JSMarshalerType result) { CheckTask(arg1); diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.cs index 551379f5569eb..c4a066aceb848 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSObject.cs @@ -21,6 +21,8 @@ public partial class JSObject : IDisposable /// /// Checks whether the target object or one of its prototypes has a property with the specified name. /// + /// The name of the property. + /// when the object has the property with the specified name. [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool HasProperty(string propertyName) { @@ -31,6 +33,8 @@ public bool HasProperty(string propertyName) /// /// Returns typeof() of the property. /// + /// The name of the property. + /// One of "undefined", "object", "boolean", "number", "bigint", "string", "symbol" or "function". [MethodImpl(MethodImplOptions.AggressiveInlining)] public string GetTypeOfProperty(string propertyName) { @@ -39,8 +43,10 @@ public string GetTypeOfProperty(string propertyName) } /// - /// Returns value of the property as if the property exists, otherwise false. + /// Returns the value of the specified property as if the property exists, otherwise . /// + /// The name of the property. + /// The value of the property with the specified name. /// Will throw when the property value is not a bool. /// /// @@ -54,6 +60,8 @@ public bool GetPropertyAsBoolean(string propertyName) /// /// Returns value of the property as if the property exists, otherwise 0. /// + /// The name of the property. + /// The value of the property with the specified name. /// /// /// Will throw when the property value is not an integer. @@ -67,6 +75,8 @@ public int GetPropertyAsInt32(string propertyName) /// /// Returns value of the property as if the property exists, otherwise 0. /// + /// The name of the property. + /// The value of the property with the specified name. /// /// /// Will throw when the property value is not a number. @@ -80,6 +90,8 @@ public double GetPropertyAsDouble(string propertyName) /// /// Returns value of the property as if the property exists, otherwise null. /// + /// The name of the property. + /// The value of the property with the specified name. /// /// /// Will throw when the property value is not a string. @@ -93,6 +105,8 @@ public double GetPropertyAsDouble(string propertyName) /// /// Returns value of the property as proxy if the property exists, otherwise null. /// + /// The name of the property. + /// The value of the property with the specified name. /// /// /// Will throw when the property value is not an object. @@ -106,6 +120,8 @@ public double GetPropertyAsDouble(string propertyName) /// /// Returns value of the property as array if the property exists, otherwise null. /// + /// The name of the property. + /// The value of the property with the specified name. /// /// /// Will throw when the property value is not an array. @@ -120,6 +136,8 @@ public double GetPropertyAsDouble(string propertyName) /// /// Defines a new property on the target object, or modifies an existing property to have the specified value. /// + /// The name of the property. + /// Value of property to set. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetProperty(string propertyName, bool value) { @@ -130,6 +148,8 @@ public void SetProperty(string propertyName, bool value) /// /// Defines a new property on the target object, or modifies an existing property to have the specified value. /// + /// The name of the property. + /// Value of property to set. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetProperty(string propertyName, int value) { @@ -140,6 +160,8 @@ public void SetProperty(string propertyName, int value) /// /// Defines a new property on the target object, or modifies an existing property to have the specified value. /// + /// The name of the property. + /// Value of property to set. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetProperty(string propertyName, double value) { @@ -150,6 +172,8 @@ public void SetProperty(string propertyName, double value) /// /// Defines a new property on the target object, or modifies an existing property to have the specified value. /// + /// The name of the property. + /// Value of property to set. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetProperty(string propertyName, string? value) { @@ -160,6 +184,8 @@ public void SetProperty(string propertyName, string? value) /// /// Defines a new property on the target object, or modifies an existing property to have the specified value. /// + /// The name of the property. + /// Value of property to set. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetProperty(string propertyName, JSObject? value) { @@ -170,6 +196,8 @@ public void SetProperty(string propertyName, JSObject? value) /// /// Defines a new property on the target object, or modifies an existing property to have the specified value. /// + /// The name of the property. + /// Value of property to set. /// The method will copy the bytes. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetProperty(string propertyName, byte[]? value) diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSType.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSType.cs index 0bedac93e9e6b..1e2df77137196 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSType.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSType.cs @@ -6,7 +6,7 @@ namespace System.Runtime.InteropServices.JavaScript { /// - /// Used as generic argument for to express expected JavaScript type, which should be source or result of argument marshaling. + /// Used as generic argument for to express expected JavaScript type, which should be input or output of argument marshaling. /// [SupportedOSPlatform("browser")] public abstract class JSType @@ -29,7 +29,7 @@ internal Discard() { } } /// - /// Marshal as JavaScript Boolean type. + /// Marshal as JavaScript Boolean type. /// public sealed class Boolean : JSType { @@ -37,7 +37,7 @@ internal Boolean() { } } /// - /// Marshal as JavaScript Number type. + /// Marshal as JavaScript Number type. /// public sealed class Number : JSType { @@ -45,7 +45,7 @@ internal Number() { } } /// - /// Marshal as JavaScript BigInt type. + /// Marshal as JavaScript BigInt type. /// public sealed class BigInt : JSType { @@ -53,7 +53,7 @@ internal BigInt() { } } /// - /// Marshal as JavaScript Date type. + /// Marshal as JavaScript Date type. /// public sealed class Date : JSType { @@ -61,7 +61,7 @@ internal Date() { } } /// - /// Marshal as JavaScript String type. + /// Marshal as JavaScript String type. /// public sealed class String : JSType { @@ -69,7 +69,7 @@ internal String() { } } /// - /// Marshal as JavaScript Object type. + /// Marshal as JavaScript Object type. /// public sealed class Object : JSType { @@ -77,7 +77,7 @@ internal Object() { } } /// - /// Marshal as JavaScript Error type. + /// Marshal as JavaScript Error type. /// public sealed class Error : JSType { @@ -93,23 +93,25 @@ internal MemoryView() { } } /// - /// Marshal as copy of JavaScript Array or TypedArray type. + /// Marshal as a copy of the JavaScript Array or TypedArray type. /// + /// The type of array element. public sealed class Array : JSType where T : JSType { internal Array() { } } /// - /// Marshal as JavaScript Promise type. + /// Marshal as JavaScript Promise type. /// + /// The type of marshalled result value. public sealed class Promise : JSType where T : JSType { internal Promise() { } } /// - /// Marshal as JavaScript Function type. + /// Marshal as JavaScript Function type. /// public sealed class Function : JSType { @@ -117,32 +119,42 @@ internal Function() { } } /// - /// Marshal as JavaScript Function type. + /// Marshal as JavaScript Function type. /// + /// The type of marshaled parameter or result. public sealed class Function : JSType where T : JSType { internal Function() { } } /// - /// Marshal as JavaScript Function type. + /// Marshal as JavaScript Function type. /// + /// The type of marshaled parameter or result. + /// Type of marshaled parameter. public sealed class Function : JSType where T1 : JSType where T2 : JSType { internal Function() { } } /// - /// Marshal as JavaScript Function type. + /// Marshal as JavaScript Function type. /// + /// The type of marshaled parameter or result. + /// Type of marshaled parameter. + /// Type of marshaled parameter. public sealed class Function : JSType where T1 : JSType where T2 : JSType where T3 : JSType { internal Function() { } } /// - /// Marshal as JavaScript Function type. + /// Marshal as JavaScript Function type. /// + /// The type of marshaled parameter or result. + /// Type of marshaled parameter. + /// Type of marshaled parameter. + /// Type of marshaled parameter. public sealed class Function : JSType where T1 : JSType where T2 : JSType where T3 : JSType where T4 : JSType { internal Function() { } diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Array.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Array.cs index 2c669c0673e72..83ae782f8feae 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Array.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Array.cs @@ -31,20 +31,20 @@ internal Array(IntPtr jsHandle) : base(jsHandle) /// /// Push the specified elements. /// - /// The new length of the Array push was called on + /// The new length of the Array push was called on. /// Elements. public int Push(params object[] elements) => (int)this.Invoke("push", elements); /// /// Pop this instance. /// - /// The element removed from the array or null if the array was empty + /// The element removed from the array or null if the array was empty. public object Pop() => (object)this.Invoke("pop"); /// /// Remove the first element of the Array and return that element /// - /// The removed element + /// The removed element. public object Shift() => this.Invoke("shift"); /// @@ -57,15 +57,15 @@ internal Array(IntPtr jsHandle) : base(jsHandle) /// /// Index of the search element. /// - /// The index of first occurrence of searchElement in the Array or -1 if not Found + /// The index of first occurrence of searchElement in the Array or -1 if not Found. /// Search element. - /// The index to start the search from + /// The index to start the search from. public int IndexOf(object searchElement, int fromIndex = 0) => (int)this.Invoke("indexOf", searchElement, fromIndex); /// /// Finds the index of the last occurrence of /// - /// The index of the last occurrence + /// The index of the last occurrence. /// Search element. public int LastIndexOf(object searchElement) => (int)this.Invoke("lastIndexOf", searchElement); diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/ArrayBuffer.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/ArrayBuffer.cs index f02e18a818104..972bfea02f15b 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/ArrayBuffer.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/ArrayBuffer.cs @@ -32,7 +32,7 @@ internal ArrayBuffer(IntPtr jsHandle) : base(jsHandle) /// /// Gets a value indicating whether this ArrayBuffer is view. /// - /// true if is view; otherwise, false. + /// if is view; otherwise, . public bool IsView => (bool)this.GetObjectProperty("isView"); /// diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Runtime.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Runtime.cs index 469f71c42392b..d89584533bfdb 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Runtime.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/Runtime.cs @@ -51,7 +51,7 @@ public static object Invoke(this JSObject self, string method, params object?[] /// Returns the named property from the object, or throws a JSException on error. /// /// thisArg - /// The name of the property to lookup + /// The name of the property to lookup. /// /// This method can raise a JSException if fetching the property in Javascript raises an exception. /// @@ -90,7 +90,7 @@ public static object GetObjectProperty(this JSObject self, string name) /// /// /// thisArg - /// The name of the property to lookup + /// The name of the property to lookup. /// The value can be a primitive type (int, double, string, bool), an /// array that will be surfaced as a typed ArrayBuffer (byte[], sbyte[], short[], ushort[], /// float[], double[]) diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.BigInt64.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.BigInt64.cs index f53960e618e3c..a2bce80d13b89 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.BigInt64.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.BigInt64.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManagedBig(out long value) { @@ -26,6 +27,7 @@ public unsafe void ToManagedBig(out long value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJSBig(long value) { @@ -37,6 +39,7 @@ public void ToJSBig(long value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManagedBig(out long? value) { @@ -52,6 +55,7 @@ public unsafe void ToManagedBig(out long? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJSBig(long? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Bool.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Bool.cs index 336db0c50d26f..375e4b97f4a5a 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Bool.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Bool.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out bool value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out bool value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(bool value) { @@ -37,6 +39,7 @@ public void ToJS(bool value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out bool? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out bool? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(bool? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Byte.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Byte.cs index 0c97341aac2af..1ce1dc2da6a7e 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Byte.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Byte.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out byte value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out byte value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(byte value) { @@ -37,6 +39,7 @@ public void ToJS(byte value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out byte? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out byte? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(byte? value) { @@ -70,6 +74,7 @@ public void ToJS(byte? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out byte[]? value) { if (slot.Type == MarshalerType.None) @@ -86,6 +91,7 @@ public unsafe void ToManaged(out byte[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToJS(byte[]? value) { if (value == null) @@ -104,6 +110,7 @@ public unsafe void ToJS(byte[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. // this only supports array round-trip, there is no way how to create ArraySegment in JS public unsafe void ToManaged(out ArraySegment value) { @@ -117,6 +124,7 @@ public unsafe void ToManaged(out ArraySegment value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToJS(ArraySegment value) { if (value.Array == null) @@ -135,6 +143,7 @@ public unsafe void ToJS(ArraySegment value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out Span value) { value = new Span((void*)slot.IntPtrValue, slot.Length); @@ -144,7 +153,8 @@ public unsafe void ToManaged(out Span value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// - /// caller is responsible for pinning + /// caller is responsible for pinning. + /// The value to be marshaled. public unsafe void ToJS(Span value) { slot.Length = value.Length; diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Char.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Char.cs index 8a0500068e2dc..7daddfb0fd444 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Char.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Char.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out char value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out char value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(char value) { @@ -37,6 +39,7 @@ public void ToJS(char value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out char? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out char? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(char? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.DateTime.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.DateTime.cs index 3984941ab5284..6521ac0c54b9a 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.DateTime.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.DateTime.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out DateTimeOffset value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out DateTimeOffset value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(DateTimeOffset value) { @@ -37,6 +39,7 @@ public void ToJS(DateTimeOffset value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out DateTimeOffset? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out DateTimeOffset? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(DateTimeOffset? value) { @@ -70,6 +74,7 @@ public void ToJS(DateTimeOffset? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out DateTime value) { @@ -85,6 +90,7 @@ public unsafe void ToManaged(out DateTime value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(DateTime value) { @@ -96,6 +102,7 @@ public void ToJS(DateTime value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out DateTime? value) { @@ -111,6 +118,7 @@ public unsafe void ToManaged(out DateTime? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(DateTime? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Double.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Double.cs index 43c48bec9dd73..9589ea0f42f7a 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Double.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Double.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out double value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out double value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(double value) { @@ -37,6 +39,7 @@ public void ToJS(double value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out double? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out double? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(double? value) { @@ -70,6 +74,7 @@ public void ToJS(double? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out double[]? value) { @@ -87,6 +92,7 @@ public unsafe void ToManaged(out double[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(double[] value) { @@ -106,6 +112,7 @@ public void ToJS(double[] value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. // this only supports array round-trip public unsafe void ToManaged(out ArraySegment value) { @@ -119,6 +126,7 @@ public unsafe void ToManaged(out ArraySegment value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToJS(ArraySegment value) { if (value.Array == null) @@ -137,6 +145,7 @@ public unsafe void ToJS(ArraySegment value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out Span value) { value = new Span((void*)slot.IntPtrValue, slot.Length); @@ -146,7 +155,8 @@ public unsafe void ToManaged(out Span value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// - /// caller is responsible for pinning + /// caller is responsible for pinning. + /// The value to be marshaled. public unsafe void ToJS(Span value) { slot.Length = value.Length; diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Exception.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Exception.cs index 8c2ec3fbddc89..0e9dfbabf936a 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Exception.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Exception.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out Exception? value) { @@ -45,6 +46,7 @@ public unsafe void ToManaged(out Exception? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToJS(Exception? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Func.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Func.cs index e631f8994e451..0b84e72c42acb 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Func.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Func.cs @@ -124,6 +124,7 @@ public void InvokeJS(T1 arg1, T2 arg2, T3 arg3) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out Action? value) { if (slot.Type == MarshalerType.None) @@ -139,6 +140,9 @@ public unsafe void ToManaged(out Action? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Action. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Action. public unsafe void ToManaged(out Action? value, ArgumentToJSCallback arg1Marshaler) { if (slot.Type == MarshalerType.None) @@ -154,6 +158,11 @@ public unsafe void ToManaged(out Action? value, ArgumentToJSCallback ar /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Action. + /// The type of the marshaled argument of the Action. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Action. + /// The generated callback which marshals the argument of the Action. public unsafe void ToManaged(out Action? value, ArgumentToJSCallback arg1Marshaler, ArgumentToJSCallback arg2Marshaler) { if (slot.Type == MarshalerType.None) @@ -169,6 +178,13 @@ public unsafe void ToManaged(out Action? value, ArgumentToJSCall /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Action. + /// The type of the marshaled argument of the Action. + /// The type of the marshaled argument of the Action. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Action. + /// The generated callback which marshals the argument of the Action. + /// The generated callback which marshals the argument of the Action. public unsafe void ToManaged(out Action? value, ArgumentToJSCallback arg1Marshaler, ArgumentToJSCallback arg2Marshaler, ArgumentToJSCallback arg3Marshaler) { if (slot.Type == MarshalerType.None) @@ -319,6 +335,9 @@ public TResult InvokeJS(T1 arg1, T2 arg2, T3 arg3) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the result of the Func. public unsafe void ToManaged(out Func? value, ArgumentToManagedCallback resMarshaler) { if (slot.Type == MarshalerType.None) @@ -334,6 +353,11 @@ public unsafe void ToManaged(out Func? value, ArgumentToManage /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Func. + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the result of the Func. public unsafe void ToManaged(out Func? value, ArgumentToJSCallback arg1Marshaler, ArgumentToManagedCallback resMarshaler) { if (slot.Type == MarshalerType.None) @@ -350,6 +374,13 @@ public unsafe void ToManaged(out Func? value, ArgumentTo /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Func. + /// The type of the marshaled argument of the Func. + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the result of the Func. public unsafe void ToManaged(out Func? value, ArgumentToJSCallback arg1Marshaler, ArgumentToJSCallback arg2Marshaler, ArgumentToManagedCallback resMarshaler) { if (slot.Type == MarshalerType.None) @@ -365,6 +396,15 @@ public unsafe void ToManaged(out Func? value, /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Func. + /// The type of the marshaled argument of the Func. + /// The type of the marshaled argument of the Func. + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the result of the Func. public unsafe void ToManaged(out Func? value, ArgumentToJSCallback arg1Marshaler, ArgumentToJSCallback arg2Marshaler, ArgumentToJSCallback arg3Marshaler, ArgumentToManagedCallback resMarshaler) { if (slot.Type == MarshalerType.None) @@ -380,6 +420,7 @@ public unsafe void ToManaged(out Func? /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToJS(Action value) { Action cpy = value; @@ -397,6 +438,9 @@ public unsafe void ToJS(Action value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Action. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Action. public unsafe void ToJS(Action value, ArgumentToManagedCallback arg1Marshaler) { Action cpy = value; @@ -415,6 +459,11 @@ public unsafe void ToJS(Action value, ArgumentToManagedCallback arg1Mar /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Action. + /// The type of the marshaled argument of the Action. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Action. + /// The generated callback which marshals the argument of the Action. public unsafe void ToJS(Action value, ArgumentToManagedCallback arg1Marshaler, ArgumentToManagedCallback arg2Marshaler) { Action cpy = value; @@ -435,6 +484,13 @@ public unsafe void ToJS(Action value, ArgumentToManagedCallback< /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Action. + /// The type of the marshaled argument of the Action. + /// The type of the marshaled argument of the Action. + /// The value to be marshaled. + /// The generated callback which marshals the argument of the Action. + /// The generated callback which marshals the argument of the Action. + /// The generated callback which marshals the argument of the Action. public unsafe void ToJS(Action value, ArgumentToManagedCallback arg1Marshaler, ArgumentToManagedCallback arg2Marshaler, ArgumentToManagedCallback arg3Marshaler) { Action cpy = value; @@ -457,6 +513,9 @@ public unsafe void ToJS(Action value, ArgumentToManagedC /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the result of the Func. public unsafe void ToJS(Func value, ArgumentToJSCallback resMarshaler) { Func cpy = value; @@ -475,6 +534,11 @@ public unsafe void ToJS(Func value, ArgumentToJSCallback + /// The type of the marshaled argument of the Func. + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the result of the Func. + /// The generated callback which marshals the argument of the Func. public unsafe void ToJS(Func value, ArgumentToManagedCallback arg1Marshaler, ArgumentToJSCallback resMarshaler) { Func cpy = value; @@ -495,6 +559,13 @@ public unsafe void ToJS(Func value, ArgumentToManagedCal /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Func. + /// The type of the marshaled argument of the Func. + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the result of the Func. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the argument of the Func. public unsafe void ToJS(Func value, ArgumentToManagedCallback arg1Marshaler, ArgumentToManagedCallback arg2Marshaler, ArgumentToJSCallback resMarshaler) { Func cpy = value; @@ -517,6 +588,15 @@ public unsafe void ToJS(Func value, ArgumentTo /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The type of the marshaled argument of the Func. + /// The type of the marshaled argument of the Func. + /// The type of the marshaled argument of the Func. + /// Type of marshaled result of the Func. + /// The value to be marshaled. + /// The generated callback which marshals the result of the Func. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the argument of the Func. + /// The generated callback which marshals the argument of the Func. public unsafe void ToJS(Func value, ArgumentToManagedCallback arg1Marshaler, ArgumentToManagedCallback arg2Marshaler, ArgumentToManagedCallback arg3Marshaler, ArgumentToJSCallback resMarshaler) { Func cpy = value; diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int16.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int16.cs index aa1ea30fbfb0a..6a2fec5e0f2fa 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int16.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int16.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out short value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out short value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(short value) { @@ -37,6 +39,7 @@ public void ToJS(short value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out short? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out short? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(short? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int32.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int32.cs index 75b25496398da..0f384d1bf75a0 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int32.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int32.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out int value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out int value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(int value) { @@ -37,6 +39,7 @@ public void ToJS(int value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out int? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out int? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(int? value) { @@ -70,6 +74,7 @@ public void ToJS(int? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out int[]? value) { if (slot.Type == MarshalerType.None) @@ -86,6 +91,7 @@ public unsafe void ToManaged(out int[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToJS(int[]? value) { if (value == null) @@ -104,6 +110,7 @@ public unsafe void ToJS(int[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. // this only supports array round-trip public unsafe void ToManaged(out ArraySegment value) { @@ -117,6 +124,7 @@ public unsafe void ToManaged(out ArraySegment value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToJS(ArraySegment value) { if (value.Array == null) @@ -135,6 +143,7 @@ public unsafe void ToJS(ArraySegment value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out Span value) { value = new Span((void*)slot.IntPtrValue, slot.Length); @@ -144,7 +153,8 @@ public unsafe void ToManaged(out Span value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// - /// caller is responsible for pinning + /// caller is responsible for pinning. + /// The value to be marshaled. public unsafe void ToJS(Span value) { slot.Length = value.Length; diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int52.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int52.cs index a22902bf4e0f4..920935a209161 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int52.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Int52.cs @@ -14,6 +14,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out long value) { @@ -29,6 +30,7 @@ public unsafe void ToManaged(out long value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(long value) { @@ -45,6 +47,7 @@ public void ToJS(long value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out long? value) { @@ -60,6 +63,7 @@ public unsafe void ToManaged(out long? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(long? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.IntPtr.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.IntPtr.cs index 88a9776ecad21..251db16215122 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.IntPtr.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.IntPtr.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out IntPtr value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out IntPtr value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(IntPtr value) { @@ -37,6 +39,7 @@ public void ToJS(IntPtr value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out IntPtr? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out IntPtr? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(IntPtr? value) { @@ -70,6 +74,7 @@ public void ToJS(IntPtr? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out void* value) { @@ -85,6 +90,7 @@ public unsafe void ToManaged(out void* value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToJS(void* value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.JSObject.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.JSObject.cs index 58522b4622ae7..b7252418e9052 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.JSObject.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.JSObject.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out JSObject? value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out JSObject? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(JSObject? value) { @@ -49,6 +51,7 @@ public void ToJS(JSObject? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out JSObject?[]? value) { @@ -74,6 +77,7 @@ public unsafe void ToManaged(out JSObject?[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToJS(JSObject?[] value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Object.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Object.cs index ac9395194a4bb..65187fab7a4a9 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Object.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Object.cs @@ -17,6 +17,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out object? value) { @@ -108,6 +109,7 @@ public unsafe void ToManaged(out object? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(object? value) { @@ -324,6 +326,7 @@ public void ToJS(object? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out object?[]? value) { @@ -350,6 +353,7 @@ public unsafe void ToManaged(out object?[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToJS(object?[] value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Single.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Single.cs index 08dfe11ed37f2..c22d26c86520a 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Single.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Single.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out float value) { @@ -26,6 +27,7 @@ public unsafe void ToManaged(out float value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(float value) { @@ -37,6 +39,7 @@ public void ToJS(float value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out float? value) { @@ -52,6 +55,7 @@ public unsafe void ToManaged(out float? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ToJS(float? value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.String.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.String.cs index afabd54c14ece..eef48c79c82db 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.String.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.String.cs @@ -11,6 +11,7 @@ public partial struct JSMarshalerArgument /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out string? value) { @@ -30,6 +31,7 @@ public unsafe void ToManaged(out string? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToJS(string? value) { @@ -57,6 +59,7 @@ public unsafe void ToJS(string? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToManaged(out string?[]? value) { @@ -83,6 +86,7 @@ public unsafe void ToManaged(out string?[]? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ToJS(string?[] value) { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs index 13876867c8a54..9c3edf3790ec6 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling/JSMarshalerArgument.Task.cs @@ -10,23 +10,30 @@ namespace System.Runtime.InteropServices.JavaScript public partial struct JSMarshalerArgument { /// - /// Helps with marshaling of the Task result or Function arguments. - /// It's used by JSImport code generator and should not be used by developers in source code. + /// Assists in marshalling of Task results and Function arguments. + /// This API is used by JSImport code generator and should not be used by developers in source code. /// + /// Type of the marshaled value. + /// The low-level argument representation. + /// The value to be marshaled. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public delegate void ArgumentToManagedCallback(ref JSMarshalerArgument arg, out T value); /// - /// Helps with marshaling of the Task result or Function arguments. - /// It's used by JSImport code generator and should not be used by developers in source code. + /// Assists in marshalling of Task results and Function arguments. + /// This API is used by JSImport code generator and should not be used by developers in source code. /// + /// Type of the marshaled value. + /// The low-level argument representation. + /// The value to be marshaled. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public delegate void ArgumentToJSCallback(ref JSMarshalerArgument arg, T value); /// /// Implementation of the argument marshaling. - /// It's used by JSImport code generator and should not be used by developers in source code. + /// This API is used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public unsafe void ToManaged(out Task? value) { if (slot.Type == MarshalerType.None) @@ -63,6 +70,9 @@ public unsafe void ToManaged(out Task? value) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. + /// The generated callback which marshals the result value of the . + /// Type of marshaled result of the . public unsafe void ToManaged(out Task? value, ArgumentToManagedCallback marshaler) { if (slot.Type == MarshalerType.None) @@ -177,6 +187,7 @@ static void MarshalResult(ref JSMarshalerArgument arg, object? taskResult) /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. public void ToJS(Task? value) { Task? task = value; @@ -248,6 +259,9 @@ void Complete() /// Implementation of the argument marshaling. /// It's used by JSImport code generator and should not be used by developers in source code. /// + /// The value to be marshaled. + /// The generated callback which marshals the result value of the . + /// Type of marshaled result of the . public void ToJS(Task? value, ArgumentToJSCallback marshaler) { Task? task = value;