Skip to content

Commit 415262d

Browse files
authored
Releases/2.3 (#39)
* Getter and setter call syntax (#38) * Allow customization of ConstantExpression and fix method calls to property getters/setters (#36) * add convert property methods setting * implement ConvertPropertyMethodsToSimpleSyntax * add setting "NameConstantsUsing" * allow user to customize how a ConstantExpression is written * Adding public instance getter and setter call translation tests Making property method call to property syntax translation the default Tidying * Support for static property getter and setter call translation * Test coverage for non-public property getter and setter call translation * Test coverage for use-defined constant translator * Updating Readme * Using static Expression imports in tests * Updating to v2.3 * v2.3 NuGet package, installer and visualizers
1 parent 8d4d6b8 commit 415262d

40 files changed

+1333
-1038
lines changed
1.5 KB
Binary file not shown.
1 KB
Binary file not shown.
1.5 KB
Binary file not shown.
1 KB
Binary file not shown.
1 KB
Binary file not shown.
1 KB
Binary file not shown.
4 KB
Binary file not shown.

CommonAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[assembly: AssemblyCompany("AgileObjects Ltd")]
66
[assembly: AssemblyProduct("AgileObjects.ReadableExpressions")]
7-
[assembly: AssemblyCopyright("Copyright © AgileObjects Ltd 2018")]
7+
[assembly: AssemblyCopyright("Copyright © AgileObjects Ltd 2019")]
88
[assembly: NeutralResourcesLanguage("en")]
99

1010
[assembly: CLSCompliant(true)]
151 KB
Binary file not shown.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ To include namespaces when outputting Type names, use:
2626
To define a custom factory for naming anonymous types, use:
2727

2828
string readable = myExpression
29-
.ToReadableString(c => c.NameAnonymousTypesUsing(anonType => GetAnonTypeName(anonType)));
29+
.ToReadableString(c => c.NameAnonymousTypesUsing(
30+
anonType => GetAnonTypeName(anonType)));
31+
32+
To define a custom factory for translating ConstantExpression values, use:
33+
34+
string readable = myExpression
35+
.ToReadableString(c => c.TranslateConstantsUsing(
36+
(constantType, constantValue) => GetConstantValue(constantType, constantValue)));
3037

3138
To output a source code comment when a lambda is '[quoted](https://stackoverflow.com/questions/3716492/what-does-expression-quote-do-that-expression-constant-can-t-already-do)', use:
3239

0 commit comments

Comments
 (0)