Class ExpressionDescription
Represents the identifing information and metadata for a C# expression. This serves both as a request to create an expression, but also as a unique identifying key for an expression.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Expressions.CSharpExpressions
Assembly: ZptSharp.CSharpExpressions.dll
Syntax
public sealed class ExpressionDescription : IEquatable<ExpressionDescription>
Constructors
| Improve this Doc View SourceExpressionDescription(String, IEnumerable<AssemblyReference>, IEnumerable<UsingNamespace>, IEnumerable<String>, IEnumerable<VariableType>)
Initializes a new instance of Expression
Declaration
public ExpressionDescription(string expression, IEnumerable<AssemblyReference> assemblyReferences, IEnumerable<UsingNamespace> usingNamespaces, IEnumerable<string> inScopeVariableNames, IEnumerable<VariableType> typeDesignations)
Parameters
Type | Name | Description |
---|---|---|
System. |
expression | The expression body. |
System. |
assemblyReferences | The assembly references. |
System. |
usingNamespaces | The using namespaces. |
System. |
inScopeVariableNames | A collection of the names of variables which are in-scope for this expression. |
System. |
typeDesignations | A collection of variable-type-designations. |
Properties
| Improve this Doc View SourceAssemblyReferences
Gets a collection of the assembly references which should be available when the expression is evaluated.
Declaration
public IReadOnlyCollection<AssemblyReference> AssemblyReferences { get; }
Property Value
Type | Description |
---|---|
System. |
Expression
Gets the body of the expression itself. This is an executable C# script.
Declaration
public string Expression { get; }
Property Value
Type | Description |
---|---|
System. |
The expression body. |
InScopeVariableNames
Gets a collection of the names of variables which are in-scope for this expression.
Declaration
public IReadOnlyCollection<string> InScopeVariableNames { get; }
Property Value
Type | Description |
---|---|
System. |
TypeDesignations
Gets a collection of variable-type-designations. These indicate any variables which should be treated as
strongly-typed instances and not as dynamic
objects.
Declaration
public IReadOnlyCollection<VariableType> TypeDesignations { get; }
Property Value
Type | Description |
---|---|
System. |
UsingNamespaces
Gets a collection of the using
namespaces which should be 'in scope' when the expression is evaluated.
Declaration
public IReadOnlyCollection<UsingNamespace> UsingNamespaces { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceEquals(Object)
Gets a value which indicates if the current instance is equal to the specified System.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj | An object. |
Returns
Type | Description |
---|---|
System. |
|
Overrides
Equals(ExpressionDescription)
Gets a value which indicates if the current instance is equal to the specified Expression
Declaration
public bool Equals(ExpressionDescription other)
Parameters
Type | Name | Description |
---|---|---|
Expression |
other | An expression specification. |
Returns
Type | Description |
---|---|
System. |
|
GetHashCode()
Gets a hash code for the current instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
The hash code. |
Overrides
ToString()
Gets a string which represents the current instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
The string representation. |