Skip to content

Commit d3299a2

Browse files
Merge pull request #6 from alexhelms/develop
.NET Core 3.0 support
2 parents 23493ca + 8055886 commit d3299a2

File tree

2 files changed

+45
-43
lines changed

2 files changed

+45
-43
lines changed

Sources/LambdaConverters.Wpf/EventSource.cs

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Diagnostics.CodeAnalysis;
33
using System.Diagnostics.Tracing;
44
using System.Runtime.CompilerServices;
5-
using JetBrains.Annotations;
65

76
namespace LambdaConverters
87
{
@@ -17,7 +16,7 @@ public static class Keywords
1716
public const EventKeywords Rules = (EventKeywords)0x10;
1817
}
1918

20-
[NotNull]
19+
[JetBrains.Annotations.NotNull]
2120
public static readonly EventSource Log = new EventSource();
2221

2322
EventSource() { }
@@ -33,8 +32,8 @@ public static class Keywords
3332
Level = EventLevel.Warning,
3433
Keywords = Keywords.Converters,
3534
Opcode = EventOpcode.Info
36-
#if NET46
37-
,Channel = EventChannel.Operational
35+
#if NET46 || NETCOREAPP
36+
, Channel = EventChannel.Operational
3837
#endif
3938
)]
4039
public void MissingConvertFunction(
@@ -63,8 +62,8 @@ public void MissingConvertFunction(
6362
Level = EventLevel.Warning,
6463
Keywords = Keywords.Converters,
6564
Opcode = EventOpcode.Info
66-
#if NET46
67-
,Channel = EventChannel.Operational
65+
#if NET46 || NETCOREAPP
66+
, Channel = EventChannel.Operational
6867
#endif
6968
)]
7069
public void MissingConvertBackFunction(
@@ -93,8 +92,8 @@ public void MissingConvertBackFunction(
9392
Level = EventLevel.Warning,
9493
Keywords = Keywords.Converters,
9594
Opcode = EventOpcode.Info
96-
#if NET46
97-
,Channel = EventChannel.Operational
95+
#if NET46 || NETCOREAPP
96+
, Channel = EventChannel.Operational
9897
#endif
9998
)]
10099
public void NonAssignableTargetType(
@@ -125,8 +124,8 @@ public void NonAssignableTargetType(
125124
Level = EventLevel.Warning,
126125
Keywords = Keywords.Converters,
127126
Opcode = EventOpcode.Info
128-
#if NET46
129-
,Channel = EventChannel.Operational
127+
#if NET46 || NETCOREAPP
128+
, Channel = EventChannel.Operational
130129
#endif
131130
)]
132131
public void NonAssignableTargetTypeForBackConversion(
@@ -157,8 +156,8 @@ public void NonAssignableTargetTypeForBackConversion(
157156
Level = EventLevel.Warning,
158157
Keywords = Keywords.Converters,
159158
Opcode = EventOpcode.Info
160-
#if NET46
161-
,Channel = EventChannel.Operational
159+
#if NET46 || NETCOREAPP
160+
, Channel = EventChannel.Operational
162161
#endif
163162
)]
164163
public void NonAssignableTargetTypeAtPositionForBackConversion(
@@ -191,8 +190,8 @@ public void NonAssignableTargetTypeAtPositionForBackConversion(
191190
Level = EventLevel.Warning,
192191
Keywords = Keywords.Converters,
193192
Opcode = EventOpcode.Info
194-
#if NET46
195-
,Channel = EventChannel.Operational
193+
#if NET46 || NETCOREAPP
194+
, Channel = EventChannel.Operational
196195
#endif
197196
)]
198197
public void NullValues(
@@ -219,8 +218,8 @@ public void NullValues(
219218
Level = EventLevel.Informational,
220219
Keywords = Keywords.Converters,
221220
Opcode = EventOpcode.Info
222-
#if NET46
223-
,Channel = EventChannel.Operational
221+
#if NET46 || NETCOREAPP
222+
, Channel = EventChannel.Operational
224223
#endif
225224
)]
226225
public void NonRequestedTargetType(
@@ -245,8 +244,8 @@ public void NonRequestedTargetType(
245244
Level = EventLevel.Informational,
246245
Keywords = Keywords.Converters,
247246
Opcode = EventOpcode.Info
248-
#if NET46
249-
,Channel = EventChannel.Operational
247+
#if NET46 || NETCOREAPP
248+
, Channel = EventChannel.Operational
250249
#endif
251250
)]
252251
public void NonRequestedTargetTypeAtPosition(
@@ -273,8 +272,8 @@ public void NonRequestedTargetTypeAtPosition(
273272
Level = EventLevel.Warning,
274273
Keywords = Keywords.Converters,
275274
Opcode = EventOpcode.Info
276-
#if NET46
277-
,Channel = EventChannel.Operational
275+
#if NET46 || NETCOREAPP
276+
, Channel = EventChannel.Operational
278277
#endif
279278
)]
280279
public void ParameterInParameterlessConverter(
@@ -303,8 +302,8 @@ public void ParameterInParameterlessConverter(
303302
Level = EventLevel.Warning,
304303
Keywords = Keywords.Converters,
305304
Opcode = EventOpcode.Info
306-
#if NET46
307-
,Channel = EventChannel.Operational
305+
#if NET46 || NETCOREAPP
306+
, Channel = EventChannel.Operational
308307
#endif
309308
)]
310309
public void ParameterInParameterlessConverterForBackConversion(
@@ -333,8 +332,8 @@ public void ParameterInParameterlessConverterForBackConversion(
333332
Level = EventLevel.Warning,
334333
Keywords = Keywords.Converters,
335334
Opcode = EventOpcode.Info
336-
#if NET46
337-
,Channel = EventChannel.Operational
335+
#if NET46 || NETCOREAPP
336+
, Channel = EventChannel.Operational
338337
#endif
339338
)]
340339
public void UnableToCastToInputType(
@@ -365,8 +364,8 @@ public void UnableToCastToInputType(
365364
Level = EventLevel.Warning,
366365
Keywords = Keywords.Converters,
367366
Opcode = EventOpcode.Info
368-
#if NET46
369-
,Channel = EventChannel.Operational
367+
#if NET46 || NETCOREAPP
368+
, Channel = EventChannel.Operational
370369
#endif
371370
)]
372371
public void UnableToCastAtPositionToInputType(
@@ -399,8 +398,8 @@ public void UnableToCastAtPositionToInputType(
399398
Level = EventLevel.Warning,
400399
Keywords = Keywords.Converters,
401400
Opcode = EventOpcode.Info
402-
#if NET46
403-
,Channel = EventChannel.Operational
401+
#if NET46 || NETCOREAPP
402+
, Channel = EventChannel.Operational
404403
#endif
405404
)]
406405
public void UnableToCastToOutputType(
@@ -431,8 +430,8 @@ public void UnableToCastToOutputType(
431430
Level = EventLevel.Warning,
432431
Keywords = Keywords.Converters,
433432
Opcode = EventOpcode.Info
434-
#if NET46
435-
,Channel = EventChannel.Operational
433+
#if NET46 || NETCOREAPP
434+
, Channel = EventChannel.Operational
436435
#endif
437436
)]
438437
public void UnableToCastToParameterType(
@@ -463,8 +462,8 @@ public void UnableToCastToParameterType(
463462
Level = EventLevel.Warning,
464463
Keywords = Keywords.Converters,
465464
Opcode = EventOpcode.Info
466-
#if NET46
467-
,Channel = EventChannel.Operational
465+
#if NET46 || NETCOREAPP
466+
, Channel = EventChannel.Operational
468467
#endif
469468
)]
470469
public void UnableToCastToParameterTypeForBackConversion(
@@ -495,8 +494,8 @@ public void UnableToCastToParameterTypeForBackConversion(
495494
Level = EventLevel.Warning,
496495
Keywords = Keywords.Selectors,
497496
Opcode = EventOpcode.Info
498-
#if NET46
499-
,Channel = EventChannel.Operational
497+
#if NET46 || NETCOREAPP
498+
, Channel = EventChannel.Operational
500499
#endif
501500
)]
502501
public void MissingSelectTemplateFunction(
@@ -525,8 +524,8 @@ public void MissingSelectTemplateFunction(
525524
Level = EventLevel.Warning,
526525
Keywords = Keywords.Selectors,
527526
Opcode = EventOpcode.Info
528-
#if NET46
529-
,Channel = EventChannel.Operational
527+
#if NET46 || NETCOREAPP
528+
, Channel = EventChannel.Operational
530529
#endif
531530
)]
532531
public void UnableToCastToItemType(
@@ -557,8 +556,8 @@ public void UnableToCastToItemType(
557556
Level = EventLevel.Warning,
558557
Keywords = Keywords.Rules,
559558
Opcode = EventOpcode.Info
560-
#if NET46
561-
,Channel = EventChannel.Operational
559+
#if NET46 || NETCOREAPP
560+
, Channel = EventChannel.Operational
562561
#endif
563562
)]
564563
public void MissingRuleFunction(
@@ -587,8 +586,8 @@ public void MissingRuleFunction(
587586
Level = EventLevel.Warning,
588587
Keywords = Keywords.Rules,
589588
Opcode = EventOpcode.Info
590-
#if NET46
591-
,Channel = EventChannel.Operational
589+
#if NET46 || NETCOREAPP
590+
, Channel = EventChannel.Operational
592591
#endif
593592
)]
594593
public void UnableToCastToRuleInputType(

Sources/LambdaConverters.Wpf/LambdaConverters.Wpf.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
2+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop" ToolsVersion="15.0">
33
<PropertyGroup>
44
<ProjectGuid>{8DE93D00-4B56-424B-AA7D-02C4A4A41F0D}</ProjectGuid>
55
<RootNamespace>LambdaConverters</RootNamespace>
6-
<TargetFrameworks>net46;net45</TargetFrameworks>
6+
<TargetFrameworks>netcoreapp3.0;net46;net45</TargetFrameworks>
77
</PropertyGroup>
88
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
99
<DocumentationFile>bin\Debug\LambdaConverters.Wpf.xml</DocumentationFile>
@@ -21,14 +21,17 @@
2121
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2222
<SignAssembly>true</SignAssembly>
2323
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
25+
<UseWPF>true</UseWPF>
26+
</PropertyGroup>
2427
<PropertyGroup>
2528
<AssemblyOriginatorKeyFile>Properties\LambdaConverters.public.snk</AssemblyOriginatorKeyFile>
2629
</PropertyGroup>
2730
<PropertyGroup>
2831
<DelaySign>true</DelaySign>
2932
<PackageId>LambdaConverters</PackageId>
3033
<Version>3.0.0</Version>
31-
<Authors>Michael Damatov, Dimitri Enns</Authors>
34+
<Authors>Michael Damatov, Dimitri Enns, Alex Helms</Authors>
3235
<Company />
3336
<Product />
3437
<Description>The library allows to create IValueConverter, IMultiValueConverter, DataTemplateSelector, and ValidationRule objects with the most convenient syntax available, ideally, using the lambda expressions.</Description>

0 commit comments

Comments
 (0)