• Articles
  • API Documentation
  • GitHub
  • Abhith
  • API Documentation
  • Code.Library.Domain.Models
  • Enumeration

    Show / Hide Table of Contents
    • Code.Library
      • Breadcrumb
      • BreadcrumbNode
      • IAuditedObject
      • IAuditedObject<TUser>
      • ICreationAuditedObject
      • ICreationAuditedObject<TCreator>
      • IDeletionAuditedObject
      • IDeletionAuditedObject<TUser>
      • IHasCreationTime
      • IHasDeletionTime
      • IHasModificationTime
      • IMayHaveCreator
      • IMayHaveCreator<TCreator>
      • IModificationAuditedObject
      • IModificationAuditedObject<TUser>
      • IResult
      • ISoftDelete
      • Result
      • Result<T>
      • Result<T, E>
      • ResultFailureException
      • ResultFailureException<E>
      • ResultSuccessException
    • Code.Library.Application.Behaviors
      • LoggingBehavior<TRequest, TResponse>
      • RequestPerformanceBehavior<TRequest, TResponse>
      • UnhandledExceptionBehavior<TRequest, TResponse>
    • Code.Library.AspNetCore
      • PerfTracker
      • ServiceCollectionExtensions
    • Code.Library.AspNetCore.Attributes
      • LogUsageAttribute
    • Code.Library.AspNetCore.Extensions
      • HealthCheckEndpointRouteBuilderExtensions
      • HttpRequestExtensions
      • ILoggerExtensions
    • Code.Library.AspNetCore.Filters
      • TrackPerformanceFilter
    • Code.Library.AspNetCore.Helpers
      • SerilogHelper
    • Code.Library.AspNetCore.Middleware
      • ApiExceptionMiddleware
      • ApiExceptionMiddlewareExtensions
      • ApiExceptionOptions
      • RequestLoggingMiddlewareExtensions
    • Code.Library.AspNetCore.Middleware.RequestResponseLogging
      • ExcludeInRequestResponseLoggingOptions
      • IncludeInRequestResponseLoggingOptions
      • RequestResponseLoggingMiddleware
      • RequestResponseLoggingMiddlewareExtensions
      • RequestResponseLoggingOptions
    • Code.Library.Domain.Models
      • Enumeration
    • Code.Library.Dtos
      • AuditedEntityDto
      • AuditedEntityDto<TPrimaryKey>
      • CreationAuditedEntityDto
      • CreationAuditedEntityDto<TPrimaryKey>
      • EntityDto
      • EntityDto<TKey>
      • EntityRequestDto<TKey>
      • FullAuditedEntityDto
      • FullAuditedEntityDto<TPrimaryKey>
      • IEntityDto
      • IEntityDto<TKey>
      • IFullAuditedObject
      • IFullAuditedObject<TUser>
      • IHasTotalCount
      • ILimitedResultRequest
      • IListResult<T>
      • IPagedAndSortedResultRequest
      • IPagedResult<T>
      • IPagedResultRequest
      • ISortedResultRequest
      • LimitedResultRequestDto
      • ListResultDto<T>
      • PagedAndSortedResultRequestDto
      • PagedResultDto<T>
      • PagedResultRequestDto
    • Code.Library.Exceptions
      • DomainException
    • Code.Library.Extensions
      • DateTimeExtensions
      • FileSystemExtensions
      • GenericTypeExtensions
      • IEnumerableExtensions
      • NumberExtensions
      • ResultExtensions
      • StringExtensions
    • Code.Library.Helpers
      • DateTimeHelper
      • FileHelper
      • SerializationHelper
      • ThirdPartyHelper

    Class Enumeration

    Inheritance
    object
    Enumeration
    Implements
    IComparable
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Code.Library.Domain.Models
    Assembly: Code.Library.dll
    Syntax
    public abstract class Enumeration : IComparable

    Constructors

    | Improve this Doc View Source

    Enumeration(int, string)

    Declaration
    protected Enumeration(int id, string name)
    Parameters
    Type Name Description
    int id
    string name

    Properties

    | Improve this Doc View Source

    Id

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

    Name

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    Methods

    | Improve this Doc View Source

    AbsoluteDifference(Enumeration, Enumeration)

    Declaration
    public static int AbsoluteDifference(Enumeration firstValue, Enumeration secondValue)
    Parameters
    Type Name Description
    Enumeration firstValue
    Enumeration secondValue
    Returns
    Type Description
    int
    | Improve this Doc View Source

    CompareTo(object)

    Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

    Declaration
    public int CompareTo(object other)
    Parameters
    Type Name Description
    object other
    Returns
    Type Description
    int

    A value that indicates the relative order of the objects being compared. The return value has these meanings:
    Value

    Meaning

    Less than zero

    This instance precedes obj in the sort order.

    Zero

    This instance occurs in the same position in the sort order as obj.

    Greater than zero

    This instance follows obj in the sort order.

    Exceptions
    Type Condition
    ArgumentException

    obj is not the same type as this instance.

    | Improve this Doc View Source

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    | Improve this Doc View Source

    FromDisplayName<T>(string)

    Declaration
    public static T FromDisplayName<T>(string displayName) where T : Enumeration
    Parameters
    Type Name Description
    string displayName
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromValue<T>(int)

    Declaration
    public static T FromValue<T>(int value) where T : Enumeration
    Parameters
    Type Name Description
    int value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetAll<T>()

    Declaration
    public static IEnumerable<T> GetAll<T>() where T : Enumeration
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Implements

    IComparable

    Extension Methods

    SerializationHelper.SerializeObject<T>(T)
    SerializationHelper.SerializeObjectUsingBinaryFormatter<T>(T)
    SerializationHelper.SerializeToXML<T>(T)
    GenericTypeExtensions.GetGenericTypeName(object)
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • Enumeration(int, string)
    • Properties
      • Id
      • Name
    • Methods
      • AbsoluteDifference(Enumeration, Enumeration)
      • CompareTo(object)
      • Equals(object)
      • FromDisplayName<T>(string)
      • FromValue<T>(int)
      • GetAll<T>()
      • GetHashCode()
      • ToString()
    • Implements
    • Extension Methods
    Back to top Generated by Abhith Rajan using DocFX