Class Statics.SwitchSyntax.Condition
Represents the result of a conditional expression inside Switch syntax.
Inheritance
System.Object
Statics.SwitchSyntax.Condition
Namespace: Towel
Assembly: Towel.dll
Syntax
public abstract class Condition : object
Methods
| Improve this Doc View SourceResolve()
Resolves the condition to a bool.
Declaration
public abstract bool Resolve()
Returns
Type | Description |
---|---|
System.Boolean | The result of the condition. |
Operators
| Improve this Doc View SourceImplicit(Boolean to Statics.SwitchSyntax.Condition)
Uses the bool as the condition result.
Declaration
public static implicit operator Statics.SwitchSyntax.Condition(bool result)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | result | The |
Returns
Type | Description |
---|---|
Statics.SwitchSyntax.Condition |
Implicit(Statics.SwitchSyntax.Condition to Boolean)
Converts a condition to a bool using the Resolve method.
Declaration
public static implicit operator bool (Statics.SwitchSyntax.Condition condition)
Parameters
Type | Name | Description |
---|---|---|
Statics.SwitchSyntax.Condition | condition | The condition to resolve to a |
Returns
Type | Description |
---|---|
System.Boolean |
Implicit(Statics.SwitchSyntax.Keyword to Statics.SwitchSyntax.Condition)
Converts a keyword to a condition result (for "Default" case).
Declaration
public static implicit operator Statics.SwitchSyntax.Condition(Statics.SwitchSyntax.Keyword keyword)
Parameters
Type | Name | Description |
---|---|---|
Statics.SwitchSyntax.Keyword | keyword |
Returns
Type | Description |
---|---|
Statics.SwitchSyntax.Condition |