Shared<T>
Represents container for value type.
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace DotNext.Runtime.CompilerServices
{
[EditorBrowsable(EditorBrowsableState.Advanced)]
public sealed class Shared<T> where T : struct
{
public T ;
public static implicit operator Shared<T>([In] [IsReadOnly] ref T? value)
{
if (!value.HasValue)
return null;
return new Shared<T> {
Value = value.GetValueOrDefault()
};
}
public static implicit operator Shared<T>(T value)
{
return new Shared<T> {
Value = value
};
}
[System.Runtime.CompilerServices.NullableContext(2)]
public override string ()
{
return Value.ToString();
}
}
}