// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. namespace Microsoft.ClearScript { ///

/// Provides a factory method for . /// public static class ValueRef { /// /// Creates a instance with the given value. /// /// The value type. /// The value to assign to the instance. /// A instance holding the given value. public static ValueRef Create(T value = default) where T : struct { return new ValueRef { Value = value }; } } /// /// Holds a value on the heap. /// /// The value type. /// /// This utility class can be used for passing mutable values to asynchronous methods. /// public class ValueRef where T : struct { internal ValueRef() { } /// /// The value currently held by the instance. /// public T Value; } }