Skip to content

Commit b7e8478

Browse files
committed
Made the library compatible to .Net 4.5
Signed-off-by: Dima Enns <[email protected]>
1 parent ffdf393 commit b7e8478

File tree

5 files changed

+31
-50
lines changed

5 files changed

+31
-50
lines changed

Sources/LambdaConverters.Deployment/LambdaConverters.nuspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package>
33
<metadata>
4-
<id>LambdaConverters</id>
4+
<id>LambdaConvertersAndCo</id>
55
<version />
6-
<title>Lambda Converters</title>
7-
<authors>Michael Damatov</authors>
6+
<title>Lambda Converters and Co.</title>
7+
<authors>Michael Damatov, Yeah69</authors>
88
<summary>Strongly-typed lambda expressions as value converters</summary>
9-
<description>The library allows to create IValueConverter and IMultiValueConverter objects with the most convenient syntax available, ideally, using the lambda expressions.</description>
10-
<projectUrl>https://github.com/michael-damatov/lambda-converters</projectUrl>
9+
<description>This is a forked version of the "Lambda Converters" framework from Michael Damatov (please see https://github.com/michael-damatov/lambda-converters). It extends its capabilities to "Lambda ValidationRules" and "Lambda DataTemplateSelectors". Besides that it decreases the required .Net version to 4.5, so broader range of project may use this library.</description>
10+
<projectUrl>https://github.com/Yeah69/lambda-converters</projectUrl>
1111
<iconUrl>https://raw.githubusercontent.com/michael-damatov/lambda-converters/master/Icon.png</iconUrl>
12-
<licenseUrl>https://github.com/michael-damatov/lambda-converters/blob/master/LICENSE</licenseUrl>
12+
<licenseUrl>https://github.com/Yeah69/lambda-converters/blob/master/LICENSE</licenseUrl>
1313
<tags>lambda expression converter wpf strongly typed value multi</tags>
1414
</metadata>
1515
<files />

Sources/LambdaConverters.Wpf/EventSource.cs

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public static class Keywords
3232
Message = "The {0} is null, conversion result is a value according to the specified error strategy ({1}).",
3333
Level = EventLevel.Warning,
3434
Keywords = Keywords.Converters,
35-
Opcode = EventOpcode.Info,
36-
Channel = EventChannel.Operational
35+
Opcode = EventOpcode.Info
3736
)]
3837
public void MissingConvertFunction(
3938
string callback,
@@ -60,8 +59,7 @@ public void MissingConvertFunction(
6059
Message = "The {0} is null, back conversion result is a value according to the specified error strategy ({1}).",
6160
Level = EventLevel.Warning,
6261
Keywords = Keywords.Converters,
63-
Opcode = EventOpcode.Info,
64-
Channel = EventChannel.Operational
62+
Opcode = EventOpcode.Info
6563
)]
6664
public void MissingConvertBackFunction(
6765
string callback,
@@ -88,8 +86,7 @@ public void MissingConvertBackFunction(
8886
Message = "The requested target type ({0}) is not assignable from the specified output type ({1}), conversion result is a value according to the specified error strategy ({2}).",
8987
Level = EventLevel.Warning,
9088
Keywords = Keywords.Converters,
91-
Opcode = EventOpcode.Info,
92-
Channel = EventChannel.Operational
89+
Opcode = EventOpcode.Info
9390
)]
9491
public void NonAssignableTargetType(
9592
string targetType,
@@ -118,8 +115,7 @@ public void NonAssignableTargetType(
118115
Message = "The requested target type ({0}) is not assignable from the specified input type ({1}), back conversion result is a value according to the specified error strategy ({2}).",
119116
Level = EventLevel.Warning,
120117
Keywords = Keywords.Converters,
121-
Opcode = EventOpcode.Info,
122-
Channel = EventChannel.Operational
118+
Opcode = EventOpcode.Info
123119
)]
124120
public void NonAssignableTargetTypeForBackConversion(
125121
string targetType,
@@ -148,8 +144,7 @@ public void NonAssignableTargetTypeForBackConversion(
148144
Message = "The requested target type ({0}) at the position {1} is not assignable from the specified input type ({2}), back conversion result is a value according to the specified error strategy ({3}).",
149145
Level = EventLevel.Warning,
150146
Keywords = Keywords.Converters,
151-
Opcode = EventOpcode.Info,
152-
Channel = EventChannel.Operational
147+
Opcode = EventOpcode.Info
153148
)]
154149
public void NonAssignableTargetTypeAtPositionForBackConversion(
155150
string targetType,
@@ -180,8 +175,7 @@ public void NonAssignableTargetTypeAtPositionForBackConversion(
180175
Message = "The provided values are null, conversion result is a value according to the specified error strategy ({0}).",
181176
Level = EventLevel.Warning,
182177
Keywords = Keywords.Converters,
183-
Opcode = EventOpcode.Info,
184-
Channel = EventChannel.Operational
178+
Opcode = EventOpcode.Info
185179
)]
186180
public void NullValues(
187181
string errorStrategy,
@@ -206,8 +200,7 @@ public void NullValues(
206200
Message = "The target type is not requested.",
207201
Level = EventLevel.Informational,
208202
Keywords = Keywords.Converters,
209-
Opcode = EventOpcode.Info,
210-
Channel = EventChannel.Operational
203+
Opcode = EventOpcode.Info
211204
)]
212205
public void NonRequestedTargetType(
213206
[CallerMemberName] string memberName = null,
@@ -230,8 +223,7 @@ public void NonRequestedTargetType(
230223
Message = "The target type at the position {0} is not requested.",
231224
Level = EventLevel.Informational,
232225
Keywords = Keywords.Converters,
233-
Opcode = EventOpcode.Info,
234-
Channel = EventChannel.Operational
226+
Opcode = EventOpcode.Info
235227
)]
236228
public void NonRequestedTargetTypeAtPosition(
237229
int position,
@@ -256,8 +248,7 @@ public void NonRequestedTargetTypeAtPosition(
256248
Message = "A conversion parameter ({0}) is provided, use the appropriate converter, conversion result is a value according to the specified error strategy ({1}).",
257249
Level = EventLevel.Warning,
258250
Keywords = Keywords.Converters,
259-
Opcode = EventOpcode.Info,
260-
Channel = EventChannel.Operational
251+
Opcode = EventOpcode.Info
261252
)]
262253
public void ParameterInParameterlessConverter(
263254
string objectType,
@@ -284,8 +275,7 @@ public void ParameterInParameterlessConverter(
284275
Message = "A conversion parameter ({0}) is provided, use the appropriate converter, back conversion result is a value according to the specified error strategy ({1}).",
285276
Level = EventLevel.Warning,
286277
Keywords = Keywords.Converters,
287-
Opcode = EventOpcode.Info,
288-
Channel = EventChannel.Operational
278+
Opcode = EventOpcode.Info
289279
)]
290280
public void ParameterInParameterlessConverterForBackConversion(
291281
string objectType,
@@ -312,8 +302,7 @@ public void ParameterInParameterlessConverterForBackConversion(
312302
Message = "The value ({0}) cannot be cast to the specified input type ({1}), conversion result is a value according to the specified error strategy ({2}).",
313303
Level = EventLevel.Warning,
314304
Keywords = Keywords.Converters,
315-
Opcode = EventOpcode.Info,
316-
Channel = EventChannel.Operational
305+
Opcode = EventOpcode.Info
317306
)]
318307
public void UnableToCastToInputType(
319308
string objectType,
@@ -342,8 +331,7 @@ public void UnableToCastToInputType(
342331
Message = "The value ({0}) at the position {1} cannot be cast to the specified input type ({2}), conversion result is a value according to the specified error strategy ({3}).",
343332
Level = EventLevel.Warning,
344333
Keywords = Keywords.Converters,
345-
Opcode = EventOpcode.Info,
346-
Channel = EventChannel.Operational
334+
Opcode = EventOpcode.Info
347335
)]
348336
public void UnableToCastAtPositionToInputType(
349337
string objectType,
@@ -374,8 +362,7 @@ public void UnableToCastAtPositionToInputType(
374362
Message = "The value ({0}) cannot be cast to the specified output type ({1}), back conversion result is a value according to the specified error strategy ({2}).",
375363
Level = EventLevel.Warning,
376364
Keywords = Keywords.Converters,
377-
Opcode = EventOpcode.Info,
378-
Channel = EventChannel.Operational
365+
Opcode = EventOpcode.Info
379366
)]
380367
public void UnableToCastToOutputType(
381368
string objectType,
@@ -404,8 +391,7 @@ public void UnableToCastToOutputType(
404391
Message = "The parameter value ({0}) cannot be cast to the specified parameter type ({1}), conversion result is a value according to the specified error strategy ({2}).",
405392
Level = EventLevel.Warning,
406393
Keywords = Keywords.Converters,
407-
Opcode = EventOpcode.Info,
408-
Channel = EventChannel.Operational
394+
Opcode = EventOpcode.Info
409395
)]
410396
public void UnableToCastToParameterType(
411397
string objectType,
@@ -434,8 +420,7 @@ public void UnableToCastToParameterType(
434420
Message = "The parameter value ({0}) cannot be cast to the specified parameter type ({1}), back conversion result is a value according to the specified error strategy ({2}).",
435421
Level = EventLevel.Warning,
436422
Keywords = Keywords.Converters,
437-
Opcode = EventOpcode.Info,
438-
Channel = EventChannel.Operational
423+
Opcode = EventOpcode.Info
439424
)]
440425
public void UnableToCastToParameterTypeForBackConversion(
441426
string objectType,
@@ -464,8 +449,7 @@ public void UnableToCastToParameterTypeForBackConversion(
464449
Message = "The {0} is null, conversion result is a value according to the specified error strategy ({1}).",
465450
Level = EventLevel.Warning,
466451
Keywords = Keywords.Selectors,
467-
Opcode = EventOpcode.Info,
468-
Channel = EventChannel.Operational
452+
Opcode = EventOpcode.Info
469453
)]
470454
public void MissingSelectTemplateFunction(
471455
string callback,
@@ -492,8 +476,7 @@ public void MissingSelectTemplateFunction(
492476
Message = "The value ({0}) cannot be cast to the specified input type ({1}), conversion result is a value according to the specified error strategy ({2}).",
493477
Level = EventLevel.Warning,
494478
Keywords = Keywords.Selectors,
495-
Opcode = EventOpcode.Info,
496-
Channel = EventChannel.Operational
479+
Opcode = EventOpcode.Info
497480
)]
498481
public void UnableToCastToItemType(
499482
string itemType,
@@ -522,8 +505,7 @@ public void UnableToCastToItemType(
522505
Message = "The {0} is null, conversion result is a value according to the specified error strategy ({1}).",
523506
Level = EventLevel.Warning,
524507
Keywords = Keywords.Rules,
525-
Opcode = EventOpcode.Info,
526-
Channel = EventChannel.Operational
508+
Opcode = EventOpcode.Info
527509
)]
528510
public void MissingRuleFunction(
529511
string callback,
@@ -550,8 +532,7 @@ public void MissingRuleFunction(
550532
Message = "The value ({0}) cannot be cast to the specified input type ({1}), conversion result is a value according to the specified error strategy ({2}).",
551533
Level = EventLevel.Warning,
552534
Keywords = Keywords.Rules,
553-
Opcode = EventOpcode.Info,
554-
Channel = EventChannel.Operational
535+
Opcode = EventOpcode.Info
555536
)]
556537
public void UnableToCastToRuleInputType(
557538
string itemType,

Sources/LambdaConverters.Wpf/LambdaConverters.Wpf.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>LambdaConverters</RootNamespace>
1111
<AssemblyName>LambdaConverters.Wpf</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile>
1515
</TargetFrameworkProfile>

Sources/LambdaConverters.Wpf/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
[assembly: AssemblyDescription("")]
99
[assembly: AssemblyConfiguration("")]
1010
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("LambdaConverters")]
12-
[assembly: AssemblyCopyright("© 2017 Michael Damatov.")]
11+
[assembly: AssemblyProduct("LambdaConvertersAndCo")]
12+
[assembly: AssemblyCopyright("© 2017 Michael Damatov, Yeah69.")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
1515

@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("2.0.0.0")]
35-
[assembly: AssemblyFileVersion("2.0.0")]
34+
[assembly: AssemblyVersion("3.0.0.0")]
35+
[assembly: AssemblyFileVersion("3.0.0")]

Sources/LambdaConverters.Wpf/Validator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected override ValidationResult ValidateInternal(object item, CultureInfo cu
7575
/// Initializes a new instance of the <see cref="ValidationRule" /> class.
7676
/// </summary>
7777
/// <typeparam name="I">The value type.</typeparam>
78-
/// <param name="ruleFunction">The <see cref="ValidationRule.Validate" /> method.</param>
78+
/// <param name="ruleFunction">The Validate method.</param>
7979
/// <param name="errorStrategy">The error strategy.</param>
8080
/// <returns>An <see cref="ValidationRule" /> object.</returns>
8181
/// <exception cref="ArgumentOutOfRangeException">

0 commit comments

Comments
 (0)