Skip to content

IncrementStrategy #19

Open
Open

Description

@JohanLarsson
  • TruncateToLimit
  • DisabledIfOverflow
  • Overflow

Activity

  1. JohanLarsson commented on Jun 21, 2017

    @JohanLarsson
    MemberAuthor
    /// <summary>
    /// Controls how increment and decrement behaves.
    /// </summary>
    public enum IncrementMode
    {
        /// <summary>
        /// Truncate to the limit if overflow would have happened.
        /// </summary>
        Truncate,
    
        /// <summary>
        /// Add the increment even if it overflows the limit.
        /// </summary>
        Overflow,
    
        /// <summary>
        /// Don't allow incrementing if the limit would be overflown.
        /// </summary>
        DisableIfOverflow,
    }
  2. milleniumbug commented on Jun 21, 2017

    @milleniumbug
    • BoundaryPolicy
    • OnLimitReached (kind of meh since it has a silly callback-like name)
  3. JohanLarsson commented on Jun 21, 2017

    @JohanLarsson
    MemberAuthor

    BoundaryPolicy is nice, thanks!

    /// <summary>
    /// Controls how increment and decrement behaves.
    /// </summary>
    public enum BoundaryPolicy
    {
        /// <summary>
        /// Truncate to the limit if overflow would have happened.
        /// </summary>
        Truncate,
    
        /// <summary>
        /// Add the increment even if it overflows the limit.
        /// </summary>
        Overflow,
    
        /// <summary>
        /// Don't allow incrementing or decrementing if the limit would be overflown.
        /// </summary>
        Disable,
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions