Skip to content

Commit ce73100

Browse files
committed
Cleanup, release preparation
1 parent a6329c3 commit ce73100

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+372
-349
lines changed

Blocks/nuget/CodeJam.Blocks.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
44
<id>CodeJam.Blocks</id>
5-
<version>1.3.2</version>
5+
<version>1.4.0-rc1</version>
66
<title>CodeJam.Blocks Library</title>
77
<authors>Andrew Koryavchenko, ig-sinicyn, Igor Tkachev, rameel</authors>
88
<licenseUrl>https://github.com/rsdn/CodeJam/blob/master/LICENSE</licenseUrl>
@@ -13,7 +13,7 @@
1313
<copyright>RSDN, 2017</copyright>
1414
<tags>mapper services csv</tags>
1515
<dependencies>
16-
<dependency id="CodeJam" version="1.3.0" />
16+
<dependency id="CodeJam" version="1.4.0-rc1" />
1717
</dependencies>
1818
</metadata>
1919
<files>

Blocks/nuget/Readme.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
CodeJam.Blocks 1.3.2 Release Notes
1+
CodeJam.Blocks 1.4.0-rc1 Release Notes
22
----------------------------------------
33

4-
What's new in 1.3.2
4+
What's new in 1.4.0-rc1
55
-------------------------
6+
* Update dependencies in nuget package
7+
* Code cleanup
8+
9+
What's new in 1.3.2
10+
-------------------
611
* .NET Framework 4.7 support
712
* Code cleanup
813

Blocks/src/CodeJam.Blocks.csproj

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@
9191
</ItemGroup>
9292
<ItemGroup>
9393
<Reference Include="System" />
94+
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
95+
<HintPath>..\..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
96+
</Reference>
9497
<Reference Include="System.XML" />
9598
<Reference Include="System.Xml.Linq" />
9699
</ItemGroup>
@@ -105,14 +108,7 @@
105108
</When>
106109
</Choose>
107110
<Choose>
108-
<When Condition="!$(DefineConstants.Contains('FW40')) AND $(DefineConstants.Contains('FW462'))">
109-
<ItemGroup>
110-
<Reference Include="System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
111-
<HintPath>..\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
112-
<Aliases>global</Aliases>
113-
</Reference>
114-
</ItemGroup>
115-
</When>
111+
<When Condition="!$(DefineConstants.Contains('FW40')) AND $(DefineConstants.Contains('FW462'))" />
116112
</Choose>
117113
<ItemGroup>
118114
<None Include="Compile.cmd">

Blocks/src/Mapping/ConvertBuilder.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System;
33
using System.Collections.Generic;
44
using System.Diagnostics.CodeAnalysis;
5+
using System.Globalization;
56
using System.Linq;
67
using System.Linq.Expressions;
78
using System.Reflection;
@@ -158,14 +159,20 @@ private static Expression GetParseEnum(Type from, Type to, Expression p)
158159
if (from == typeof(string) && to.IsEnum)
159160
{
160161
var values = Enum.GetValues(to);
161-
var names = Enum.GetNames (to);
162+
var names = Enum.GetNames(to);
162163

163164
var dic = new Dictionary<string,object>();
164165

165166
for (var i = 0; i < values.Length; i++)
166167
{
167168
var val = values.GetValue(i);
168-
var lv = (long)Convert.ChangeType(val, typeof(long), Thread.CurrentThread.CurrentCulture);
169+
var lv =
170+
// enum values always can be casted to long
171+
// ReSharper disable once PossibleNullReferenceException
172+
(long)Convert.ChangeType(
173+
val,
174+
typeof(long),
175+
CultureInfo.CurrentCulture);
169176

170177
dic[lv.ToString()] = val;
171178

Blocks/src/Mapping/ExpressionBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ private Expression ConvertCollection(Expression fromExpression, Type toType)
267267
if (toType.IsGenericType && !toType.IsGenericTypeDefinition)
268268
{
269269
var toDefinition = toType.GetGenericTypeDefinition();
270-
270+
DebugCode.BugIf(toDefinition == null, "toDefinition == null");
271271
if (toDefinition == typeof(List<>) || typeof(List<>).IsSubClass(toDefinition))
272272
return Convert(
273273
ToList(this, fromExpression, fromItemType, toItemType), toType);

Blocks/src/Metadata/XmlAttributeReader.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ public T[] GetAttributes<T>(Type type, bool inherit = true)
177177
{
178178
MetaTypeInfo t;
179179

180+
Code.AssertState(type.FullName != null, "type.FullName != null");
180181
if (_types.TryGetValue(type.FullName, out t) || _types.TryGetValue(type.Name, out t))
181182
return t.GetAttribute(typeof(T)).Select(a => (T) a.MakeAttribute(typeof(T))).ToArray();
182183

@@ -204,6 +205,7 @@ public T[] GetAttributes<T>(MemberInfo memberInfo, bool inherit = true)
204205
MetaTypeInfo t;
205206

206207
DebugCode.AssertState(type != null, "type != null");
208+
DebugCode.AssertState(type.FullName != null, "type.FullName != null");
207209
if (_types.TryGetValue(type.FullName, out t) || _types.TryGetValue(type.Name, out t))
208210
{
209211
MetaMemberInfo m;

Blocks/src/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("CodeJam.Blocks")]
13-
[assembly: AssemblyCopyright("Copyright © 2017")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,8 +32,8 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("1.4.0.0")]
36+
[assembly: AssemblyFileVersion("1.4.0.0")]
3737

3838
[assembly: InternalsVisibleTo("CodeJam.Blocks-Tests, PublicKey=" +
3939
"00240000048000009400000006020000002400005253413100040000010001000de1c523b74719" +

Blocks/src/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<packages>
3-
<package id="System.ValueTuple" version="4.3.1" targetFramework="net452" />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="System.ValueTuple" version="4.4.0" targetFramework="net452" />
44
</packages>

CodeJam.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToLambdaExpressionWhenPossible/@EntryIndexedValue">SUGGESTION</s:String>
1919
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EClosureAllocation/@EntryIndexedValue">DO_NOT_SHOW</s:String>
2020
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EObjectAllocation_002EEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String>
21+
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InheritdocConsiderUsage/@EntryIndexedValue">DO_NOT_SHOW</s:String>
2122
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InvertIf/@EntryIndexedValue">DO_NOT_SHOW</s:String>
2223
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InvocationIsSkipped/@EntryIndexedValue">DO_NOT_SHOW</s:String>
2324
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=LoopCanBeConvertedToQuery/@EntryIndexedValue">DO_NOT_SHOW</s:String>

Experimental/src/CodeJam.Experimental.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
<ItemGroup>
4040
<Reference Include="System" />
4141
<Reference Include="System.Core" />
42-
<Reference Include="System.ValueTuple, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
43-
<HintPath>..\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
42+
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
43+
<HintPath>..\..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
4444
</Reference>
4545
</ItemGroup>
4646
<ItemGroup>

0 commit comments

Comments
 (0)