Show / Hide Table of Contents

Class Enumeration

Represents a Enumeration class

Inheritance
System.Object
Enumeration
MessageCode
ModelType
SymbolType
Implements
IEnumeration
System.IComparable<Enumeration>
System.IEquatable<Enumeration>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ClingoSharp.Enums
Assembly: ClingoSharp.dll
Syntax
public abstract class Enumeration : IEnumeration, IComparable<Enumeration>, IEquatable<Enumeration>

Constructors

| Improve this Doc View Source

Enumeration(Int32)

Declaration
protected Enumeration(int value)
Parameters
Type Name Description
System.Int32 value

Properties

| Improve this Doc View Source

Name

The string value of the enumeration

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Value

The value of the enumeration

Declaration
public int Value { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

CompareTo(Enumeration)

Declaration
public abstract int CompareTo(Enumeration other)
Parameters
Type Name Description
Enumeration other
Returns
Type Description
System.Int32
| Improve this Doc View Source

Equals(Enumeration)

Declaration
public abstract bool Equals(Enumeration other)
Parameters
Type Name Description
Enumeration other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

GetNames()

Gets a iterator of the names of the constants in the enumeration

Declaration
public static IEnumerable<string> GetNames()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

A string iterator with the names of the constants in the enumeration

| Improve this Doc View Source

GetValue(Int32)

Gets the System.Linq.Enumerable value that has the specified value

Declaration
public static Enumeration GetValue(int value)
Parameters
Type Name Description
System.Int32 value

The value of a particular enumerated constant in terms

Returns
Type Description
Enumeration

The System.Linq.Enumerable containing the value of the enumerated constant

| Improve this Doc View Source

GetValues()

Gets a iterator of the constants in the enumeration

Declaration
public static IEnumerable<Enumeration> GetValues()
Returns
Type Description
System.Collections.Generic.IEnumerable<Enumeration>

A System.Linq.Enumerable iterator with the constants in the enumeration

| Improve this Doc View Source

Parse(String)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static Enumeration Parse(string name)
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

Returns
Type Description
Enumeration

An Enumeration object whose value is represented by name

| Improve this Doc View Source

Parse(String, Boolean)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static Enumeration Parse(string name, bool ignoreCase)
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

System.Boolean ignoreCase

true to ignore case; false to regard case.

Returns
Type Description
Enumeration

An Enumeration object whose value is represented by name

| Improve this Doc View Source

Parse<TEnum>(String)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static TEnum Parse<TEnum>(string name)
    where TEnum : Enumeration
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

Returns
Type Description
TEnum

An Enumeration object whose value is represented by name

Type Parameters
Name Description
TEnum

The enumeration type to which to convert name

| Improve this Doc View Source

Parse<TEnum>(String, Boolean)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static TEnum Parse<TEnum>(string name, bool ignoreCase)
    where TEnum : Enumeration
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

System.Boolean ignoreCase

true to ignore case; false to regard case.

Returns
Type Description
TEnum

An Enumeration object whose value is represented by name

Type Parameters
Name Description
TEnum

The enumeration type to which to convert name

| Improve this Doc View Source

TryParse(String, out Enumeration)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static bool TryParse(string name, out Enumeration result)
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

Enumeration result

When this method returns true, an object containing an enumeration constant representing the parsed value.

Returns
Type Description
System.Boolean

true if the conversion succeeded; false otherwise.

| Improve this Doc View Source

TryParse(String, Boolean, out Enumeration)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static bool TryParse(string name, bool ignoreCase, out Enumeration result)
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

System.Boolean ignoreCase

true to ignore case; false to regard case.

Enumeration result

When this method returns true, an object containing an enumeration constant representing the parsed value.

Returns
Type Description
System.Boolean

true if the conversion succeeded; false otherwise.

| Improve this Doc View Source

TryParse<TEnum>(String, out TEnum)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static bool TryParse<TEnum>(string name, out TEnum result)
    where TEnum : Enumeration
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

TEnum result

When this method returns true, an object containing an enumeration constant representing the parsed value.

Returns
Type Description
System.Boolean
Type Parameters
Name Description
TEnum

The enumeration type to which to convert name

| Improve this Doc View Source

TryParse<TEnum>(String, Boolean, out TEnum)

Converts the string representation of the name to an equivalent enumerated object

Declaration
public static bool TryParse<TEnum>(string name, bool ignoreCase, out TEnum result)
    where TEnum : Enumeration
Parameters
Type Name Description
System.String name

A string containing the name or value to convert

System.Boolean ignoreCase

true to ignore case; false to regard case.

TEnum result

When this method returns true, an object containing an enumeration constant representing the parsed value.

Returns
Type Description
System.Boolean
Type Parameters
Name Description
TEnum

The enumeration type to which to convert name

Implements

IEnumeration
System.IComparable<T>
System.IEquatable<T>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX