Struct LambdaExpressionCacheKey
Represents a simple System.Linq.Expressions.LambdaExpression in a form which is suitable for using as a dictionary key by exposing the return type, argument types and expression string form in a single concatenated string.
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
public struct LambdaExpressionCacheKey
Constructors
View SourceLambdaExpressionCacheKey(LambdaExpression)
Initializes a new instance of the LambdaExpressionCacheKey struct from a System.Linq.Expressions.LambdaExpression.
Declaration
public LambdaExpressionCacheKey(LambdaExpression obj)
Parameters
| Type | Name | Description |
|---|---|---|
| LambdaExpression | obj | The lambda expression to create a cache key from. |
LambdaExpressionCacheKey(string, string, params string[])
Initializes a new instance of the LambdaExpressionCacheKey struct.
Declaration
public LambdaExpressionCacheKey(string returnType, string expression, params string[] argTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| string | returnType | The return type of the lambda expression. |
| string | expression | The string representation of the lambda expression. |
| string[] | argTypes | The argument type names of the lambda expression. |
Fields
View SourceArgTypes
The argument type names of the System.Linq.Expressions.LambdaExpression
Declaration
public readonly HashSet<string?> ArgTypes
Field Value
| Type | Description |
|---|---|
| HashSet<string> |
ExpressionAsString
The original string representation of the System.Linq.Expressions.LambdaExpression
Declaration
public readonly string ExpressionAsString
Field Value
| Type | Description |
|---|---|
| string |
ReturnType
The return type of the System.Linq.Expressions.LambdaExpression
Declaration
public readonly string? ReturnType
Field Value
| Type | Description |
|---|---|
| string |
Methods
View SourceEquals(object?)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with this instance. |
Returns
| Type | Description |
|---|---|
| bool |
|
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents this instance. |