//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Runtime.CompilerServices;

#if !WASM
namespace user_rtx { using u = user_rtx;
#else
namespace user_rtx.wasm { using u = user_rtx.wasm;
#endif

/// <summary>
/// Non-nullable property support for inheritance (strict access to underlying value)
/// </summary>
public abstract class property_nn_base {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentException" />
/// <exception cref="NullReferenceException" />
[u.strict_result]
protected T Get<T>( T? value,
                    [CallerMemberName] string propertyName="" )
where T: class =>
   u.property_nn.Get<T>( this, value, propertyName );

/// <exception cref="ArgumentException" />
/// <exception cref="u.ENullValue" />
[u.strict_result]
protected T Value<T>( T? nullableValue,
                      [CallerMemberName] string propertyName="" )
where T: struct =>
   u.property_nn.Value<T>( this, nullableValue, propertyName );

//--------------------------------------------------------------------------------------------------

/// <exception cref="ArgumentException" />
public static string name_auto( [CallerMemberName] string propertyName="" ) =>
   u.property_nn.NameAuto( propertyName );

/// <exception cref="ArgumentException" />
public static string name_auto_n( [CallerMemberName] string propertyName="" ) =>
   u.property_nn.NameAutoN( propertyName );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // property_nn_base

} // user_rtx (.wasm)
