Show / Hide Table of Contents

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
System.Object
ExpressionDescription
Implements
System.IEquatable<ExpressionDescription>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: ZptSharp.Expressions.CSharpExpressions
Assembly: ZptSharp.CSharpExpressions.dll
Syntax
public sealed class ExpressionDescription : IEquatable<ExpressionDescription>

Constructors

| Improve this Doc View Source

ExpressionDescription(String, IEnumerable<AssemblyReference>, IEnumerable<UsingNamespace>, IEnumerable<String>, IEnumerable<VariableType>)

Initializes a new instance of ExpressionDescription.

Declaration
public ExpressionDescription(string expression, IEnumerable<AssemblyReference> assemblyReferences, IEnumerable<UsingNamespace> usingNamespaces, IEnumerable<string> inScopeVariableNames, IEnumerable<VariableType> typeDesignations)
Parameters
Type Name Description
System.String expression

The expression body.

System.Collections.Generic.IEnumerable<AssemblyReference> assemblyReferences

The assembly references.

System.Collections.Generic.IEnumerable<UsingNamespace> usingNamespaces

The using namespaces.

System.Collections.Generic.IEnumerable<System.String> inScopeVariableNames

A collection of the names of variables which are in-scope for this expression.

System.Collections.Generic.IEnumerable<VariableType> typeDesignations

A collection of variable-type-designations.

Properties

| Improve this Doc View Source

AssemblyReferences

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.Collections.Generic.IReadOnlyCollection<AssemblyReference>
| Improve this Doc View Source

Expression

Gets the body of the expression itself. This is an executable C# script.

Declaration
public string Expression { get; }
Property Value
Type Description
System.String

The expression body.

| Improve this Doc View Source

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.Collections.Generic.IReadOnlyCollection<System.String>
| Improve this Doc View Source

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.Collections.Generic.IReadOnlyCollection<VariableType>
| Improve this Doc View Source

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.Collections.Generic.IReadOnlyCollection<UsingNamespace>

Methods

| Improve this Doc View Source

Equals(Object)

Gets a value which indicates if the current instance is equal to the specified System.Object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

An object.

Returns
Type Description
System.Boolean

true if the instances are equal; false otherwise.

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

Equals(ExpressionDescription)

Gets a value which indicates if the current instance is equal to the specified ExpressionDescription.

Declaration
public bool Equals(ExpressionDescription other)
Parameters
Type Name Description
ExpressionDescription other

An expression specification.

Returns
Type Description
System.Boolean

true if the instances are equal; false otherwise.

| Improve this Doc View Source

GetHashCode()

Gets a hash code for the current instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

The hash code.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

ToString()

Gets a string which represents the current instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

The string representation.

Overrides
System.Object.ToString()

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX