Search Results for

    Show / Hide Table of Contents

    Class Flag

    Implements a boolean flag CRDT that is initialized to false and can be switched to true. true wins over false in merge.

    This class is immutable, i.e. "modifying" methods return a new instance.

    Inheritance
    object
    Flag
    Implements
    IReplicatedData<Flag>
    IReplicatedData
    IEquatable<Flag>
    IComparable<Flag>
    IComparable
    IReplicatedDataSerialization
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Akka.DistributedData
    Assembly: Akka.DistributedData.dll
    Syntax
    [Serializable]
    public sealed class Flag : IReplicatedData<Flag>, IReplicatedData, IEquatable<Flag>, IComparable<Flag>, IComparable, IReplicatedDataSerialization

    Constructors

    | Edit this page View Source

    Flag()

    Creates a new Flag instance set to false by default.

    Declaration
    public Flag()
    | Edit this page View Source

    Flag(bool)

    Creates a new Flag instance with value set to specified parameter.

    Declaration
    public Flag(bool enabled)
    Parameters
    Type Name Description
    bool enabled

    TBD

    Fields

    | Edit this page View Source

    False

    Flag with a false value set.

    Declaration
    public static readonly Flag False
    Field Value
    Type Description
    Flag
    | Edit this page View Source

    True

    Flag with a true value set.

    Declaration
    public static readonly Flag True
    Field Value
    Type Description
    Flag

    Properties

    | Edit this page View Source

    Enabled

    Checks if current flag value is set.

    Declaration
    public bool Enabled { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CompareTo(Flag)

    Declaration
    public int CompareTo(Flag other)
    Parameters
    Type Name Description
    Flag other
    Returns
    Type Description
    int
    | Edit this page View Source

    CompareTo(object)

    Declaration
    public int CompareTo(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    int
    | Edit this page View Source

    Equals(Flag)

    Checks if two flags are equal to each other.

    Declaration
    public bool Equals(Flag other)
    Parameters
    Type Name Description
    Flag other

    TBD

    Returns
    Type Description
    bool

    TBD

    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    Merge(Flag)

    TBD

    Declaration
    public Flag Merge(Flag other)
    Parameters
    Type Name Description
    Flag other

    TBD

    Returns
    Type Description
    Flag

    TBD

    | Edit this page View Source

    SwitchOn()

    TBD

    Declaration
    public Flag SwitchOn()
    Returns
    Type Description
    Flag

    TBD

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Operators

    | Edit this page View Source

    implicit operator bool(Flag)

    Performs an implicit conversion from Flag to bool.

    Declaration
    public static implicit operator bool(Flag flag)
    Parameters
    Type Name Description
    Flag flag

    The flag to convert

    Returns
    Type Description
    bool

    The result of the conversion

    Implements

    IReplicatedData<T>
    IReplicatedData
    IEquatable<T>
    IComparable<T>
    IComparable
    IReplicatedDataSerialization

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET