Class Enumeration
Represents a Enumeration class
Inherited Members
Namespace: ClingoSharp.Enums
Assembly: ClingoSharp.dll
Syntax
public abstract class Enumeration : IEnumeration, IComparable<Enumeration>, IEquatable<Enumeration>
Constructors
| Improve this Doc View SourceEnumeration(Int32)
Declaration
protected Enumeration(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value |
Properties
| Improve this Doc View SourceName
The string value of the enumeration
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Value
The value of the enumeration
Declaration
public int Value { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceCompareTo(Enumeration)
Declaration
public abstract int CompareTo(Enumeration other)
Parameters
Type | Name | Description |
---|---|---|
Enumeration | other |
Returns
Type | Description |
---|---|
System.Int32 |
Equals(Enumeration)
Declaration
public abstract bool Equals(Enumeration other)
Parameters
Type | Name | Description |
---|---|---|
Enumeration | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
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 |
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 |
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 |
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 |
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 |
|
Returns
Type | Description |
---|---|
Enumeration | An Enumeration object whose value is represented by |
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 |
Type Parameters
Name | Description |
---|---|
TEnum | The enumeration type to which to convert |
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 |
|
Returns
Type | Description |
---|---|
TEnum | An Enumeration object whose value is represented by |
Type Parameters
Name | Description |
---|---|
TEnum | The enumeration type to which to convert |
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 |
|
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 |
|
Enumeration | result | When this method returns true, an object containing an enumeration constant representing the parsed value. |
Returns
Type | Description |
---|---|
System.Boolean |
|
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 |
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 |
|
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 |