Skip to main content

Definition

Assembly: CloudNimble.EasyAF.Core.dll Namespace: CloudNimble.EasyAF.Core Inheritance: System.Object

Syntax

CloudNimble.EasyAF.Core.NameOf

Summary

Fills a gap in nameof by allowing you to use deep name references instead of local name references.

Remarks

Solution modified from link.

Methods

Full

Gets the full property path name from the specified expression, optionally using a custom separator.

Syntax

public static string Full<TSource>(System.Linq.Expressions.Expression<System.Func<TSource, object>> expression, string separator = ".")

Parameters

NameTypeDescription
expressionSystem.Linq.Expressions.Expression<System.Func<TSource, object>>An expression pointing to the property whose full name should be returned.
separatorstringThe character(s) used to separate property names in the result. Defaults to ”.”.

Returns

Type: string The full property path as a string with the specified separator.

Type Parameters

  • TSource - The source type containing the property.

Full

Allows you to create a source name expression when you need to have a prefixing variable in the result.

Syntax

public static string Full<TSource>(string sourceFieldName, System.Linq.Expressions.Expression<System.Func<TSource, object>> expression, string separator = ".")

Parameters

NameTypeDescription
sourceFieldNamestring-
expressionSystem.Linq.Expressions.Expression<System.Func<TSource, object>>-
separatorstringThe characters used to separate the from the result.

Returns

Type: string

Type Parameters

  • TSource -