Search Results for

    Show / Hide Table of Contents

    Class Ref<T>

    Pack the value into the box so that it is passed by reference

    Inheritance
    System.Object
    Ref<T>
    Implements
    IRef<T>
    IBox<T>
    IDeref<T>
    System.IEquatable<Ref<T>>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LibSugar
    Assembly: LibSugar.dll
    Syntax
    public class Ref<T> : IRef<T>, IBox<T>, IDeref<T>, IEquatable<Ref<T>>
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    Ref(T)

    Pack the value into the box so that it is passed by reference

    Declaration
    public Ref(T Value)
    Parameters
    Type Name Description
    T Value

    Properties

    | Improve this Doc View Source

    Deref

    Declaration
    public T Deref { get; }
    Property Value
    Type Description
    T
    | Improve this Doc View Source

    Value

    Declaration
    public T Value { get; set; }
    Property Value
    Type Description
    T

    Operators

    | Improve this Doc View Source

    Implicit(T to Ref<T>)

    Declaration
    public static implicit operator Ref<T>(T b)
    Parameters
    Type Name Description
    T b
    Returns
    Type Description
    Ref<T>
    | Improve this Doc View Source

    Implicit(Ref<T> to T)

    Declaration
    public static implicit operator T(Ref<T> s)
    Parameters
    Type Name Description
    Ref<T> s
    Returns
    Type Description
    T

    Implements

    IRef<T>
    IBox<T>
    IDeref<T>
    System.IEquatable<T>

    Extension Methods

    Sugar.Borrow<T>(T)
    Sugar.Owner<T>(T)
    Sugar.AssertEq<T>(T, T)
    Sugar.AssertNe<T>(T, T)
    Sugar.AssertSame<T>(T, T)
    Sugar.AssertNotSame<T>(T, T)
    Sugar.Box<T>(T)
    Sugar.Ref<T>(T)
    Sugar.Let<T, U>(T, Func<T, U>)
    Sugar.LetIf<T>(T, Boolean, Func<T, T>)
    Sugar.Also<T>(T, Action<T>)
    Sugar.AlsoIf<T>(T, Boolean, Action<T>)
    Sugar.MovableBy<T>(T, MovableBy<T>.Drop)
    Sugar.Seq<T>(T)
    Sugar.Seq<T>(T, T[])
    Sugar.Repeat<T>(T, Int32)
    SugarClass.AssertNull<T>(T)
    SugarClass.AssertNonNull<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © LibSugar.
    Generated by DocFX