Interface IConstantDefinitions
Container for ConstantDefinitions
Namespace: MESL.SqlRace.Domain.Functions
Assembly: MESL.SqlRace.Domain.dll
Syntax
public interface IConstantDefinitions
Properties
Count
Gets the number of constants
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[String]
Gets a constant definition by name
Declaration
IConstantDefinition this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the constant definition |
Property Value
Type | Description |
---|---|
IConstantDefinition |
Values
Gets a read-only list of all constant definitions
Declaration
IReadOnlyList<IConstantDefinition> Values { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IConstantDefinition> |
Methods
Add(IConstantDefinition)
Adds a constant definition
Declaration
void Add(IConstantDefinition constantDefinition)
Parameters
Type | Name | Description |
---|---|---|
IConstantDefinition | constantDefinition | Constant definition to add |
AddRange(IEnumerable<IConstantDefinition>)
Add a range of constant definitions
Declaration
void AddRange(IEnumerable<IConstantDefinition> constantDefs)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IConstantDefinition> | constantDefs | The enumeration of the constant definition to add |
Contains(String)
Checks if there is a constant definition with the specified name
Declaration
bool Contains(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the constant definition |
Returns
Type | Description |
---|---|
System.Boolean |
Remove(String)
Remove constant definition
Declaration
bool Remove(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of a constant definition |
Returns
Type | Description |
---|---|
System.Boolean |
TryGet(String, out IConstantDefinition)
Tries to get a constant definition if one exists
Declaration
bool TryGet(string name, out IConstantDefinition constantDefinition)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the constant definition |
IConstantDefinition | constantDefinition | A constant definition if one exists, otherwise null |
Returns
Type | Description |
---|---|
System.Boolean | True if the constant definition exists, false if it doesn't |