private JsSerializeScript ( string script, byte buffer, ulong &bufferSize ) : JsErrorCode | ||
script | string | |
buffer | byte | |
bufferSize | ulong | |
Résultat | JsErrorCode |
/// <summary> /// Serializes a parsed script to a buffer than can be reused /// </summary> /// <remarks> /// <para> /// SerializeScript parses a script and then stores the parsed form of the script in a /// runtime-independent format. The serialized script then can be deserialized in any /// runtime without requiring the script to be re-parsed. /// </para> /// <para> /// Requires an active script context. /// </para> /// </remarks> /// <param name="script">The script to serialize</param> /// <param name="buffer">The buffer to put the serialized script into. Can be null.</param> /// <returns>The size of the buffer, in bytes, required to hold the serialized script</returns> public static ulong SerializeScript(string script, byte[] buffer) { var bufferSize = (ulong)buffer.Length; IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsSerializeScript(script, buffer, ref bufferSize)); return(bufferSize); }