Skip to content

Commit 3e4a95b

Browse files
committed
Cleanup, beta 3 preparation
1 parent c49ceb0 commit 3e4a95b

File tree

15 files changed

+442
-449
lines changed

15 files changed

+442
-449
lines changed

Build/Jetbrains.Annotations.cs

Lines changed: 413 additions & 410 deletions
Large diffs are not rendered by default.

Build/Props/CodeJam.Default.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AssemblyOriginatorKeyFile>..\Build\CodeJam.snk</AssemblyOriginatorKeyFile>
1111

1212
<Version>2.2.0.0</Version>
13-
<PackageVersion>2.2.0-beta2</PackageVersion>
13+
<PackageVersion>2.2.0-beta3</PackageVersion>
1414
<PackageOutputPath>..\_Results</PackageOutputPath>
1515

1616
<Company>RSDN</Company>

CodeJam.Main/CodeJam.Main.csproj.DotSettings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=strings/@EntryIndexedValue">False</s:Boolean>
1818
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=structures/@EntryIndexedValue">True</s:Boolean>
1919
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=structures_005Coption/@EntryIndexedValue">True</s:Boolean>
20-
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=targeting/@EntryIndexedValue">True</s:Boolean>
20+
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=targeting/@EntryIndexedValue">False</s:Boolean>
2121
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=targeting_005Cfw35_005Cvaluetuple/@EntryIndexedValue">True</s:Boolean>
2222
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=targeting_005Cfw40_005Cvaluetuple/@EntryIndexedValue">True</s:Boolean>
2323
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=targeting_005Cnet40_005Cvaluetuple/@EntryIndexedValue">True</s:Boolean>

CodeJam.Main/Collections/Array/ArrayExtensions.Infix.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using System;
2-
using System.Linq;
2+
33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
5+
using System.Linq;
56

67
using JetBrains.Annotations;
78

CodeJam.Main/Collections/Dictionary/LazyDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public static ILazyDictionary<TKey, TValue> Create<TKey, TValue>(
171171
[Pure]
172172
public static ILazyDictionary<TKey, TValue> Create<TKey, TValue>(
173173
[NotNull] Func<TKey, TValue> valueFactory,
174-
[NotNull] IEqualityComparer<TKey> comparer,
174+
[CanBeNull] IEqualityComparer<TKey> comparer,
175175
LazyThreadSafetyMode threadSafety)
176176
{
177177
switch (threadSafety)

CodeJam.Main/Collections/SuffixTree/SuffixTree.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ private void FindBranchingPoint()
109109
Node activeEdge;
110110
if (_activeEdgeIndex != InvalidNodeIndex)
111111
{
112+
Debug.Assert(children != null, nameof(children) + " != null");
112113
childNodeIndex = children[_activeEdgeIndex];
113114
activeEdge = GetNode(childNodeIndex);
114115
}
@@ -132,6 +133,7 @@ private void FindBranchingPoint()
132133
return;
133134
}
134135
var c = InternalData[_currentOffset];
136+
Debug.Assert(children != null, nameof(children) + " != null");
135137
var childIndex = children.LowerBound(c, EdgeComparer);
136138
if (childIndex == children.Count)
137139
{
@@ -223,6 +225,7 @@ private void UpdateActiveEdgeAndCurrentPosition()
223225
DebugCode.AssertState(!branchNode.IsLeaf, "Invalid active state");
224226
var index = _currentOffset - _activeLength;
225227
var children = branchNode.Children;
228+
Debug.Assert(children != null, nameof(children) + " != null");
226229
var childIndex = children.LowerBound(InternalData[index], EdgeComparer);
227230
DebugCode.AssertState(childIndex != children.Count, "Invalid active state");
228231
var edgeIndex = children[childIndex];
@@ -256,6 +259,7 @@ private void InsertSuffix()
256259
if (_activeEdgeIndex != InvalidNodeIndex)
257260
{
258261
var branchChildren = branchNode.Children;
262+
Debug.Assert(branchChildren != null, nameof(branchChildren) + " != null");
259263
var edgeNodeIndex = branchChildren[_activeEdgeIndex];
260264
// need to create a new internal node
261265
var edgeNode = GetNode(edgeNodeIndex);

CodeJam.Main/Ranges/[CompositeRanges]/CompositeRange`1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ internal CompositeRange([NotNull] IEnumerable<Range<T>> ranges, UnsafeOverload s
231231
/// <summary>Collection of subranges.</summary>
232232
/// <value>The collection of subranges.</value>
233233
[NotNull]
234+
// ReSharper disable once ConstantNullCoalescingCondition
234235
public ReadOnlyCollection<Range<T>> SubRanges => _ranges ?? _emptyRanges;
235236

236237
#region T4-dont-replace

CodeJam.Main/Readme.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
CodeJam 2.2.0-beta3 Release Notes
22
---------------------------------
33

4+
What's new in 2.2.0-beta3
5+
-------------------------
46
* Add frameworks support: .NET Standard 1.6, .NET Standard 1.5, .NET Core 1.0, .NET Core 1.1.
57
* Extend .NET 2.0, .NET 3.5 and .NET 4.0 support.
68
* Use Theraot.Core dependency for older frameworks targeting.

CodeJam.Main/Reflection/MemberAccessor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace CodeJam.Reflection
2121
[PublicAPI]
2222
public class MemberAccessor
2323
{
24+
// ReSharper disable once NotNullMemberIsNotInitialized
2425
internal MemberAccessor([NotNull] TypeAccessor typeAccessor, [NotNull] string memberName)
2526
{
2627
TypeAccessor = typeAccessor;
@@ -178,6 +179,7 @@ void MakeSetter(Expression ex, int i)
178179
SetExpressions();
179180
}
180181

182+
// ReSharper disable once NotNullMemberIsNotInitialized
181183
internal MemberAccessor([NotNull] TypeAccessor typeAccessor, [NotNull] MemberInfo memberInfo)
182184
{
183185
TypeAccessor = typeAccessor;

CodeJam.Main/Targeting/TypeExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public static void SetPropertyValue(
243243
var property = type.GetTypeInfo().GetDeclaredProperty(propertyName);
244244
property.SetValue(target, value);
245245
#else
246-
type.InvokeMember(propertyName, BindingFlags.SetProperty, null, target, new object[] { value });
246+
type.InvokeMember(propertyName, BindingFlags.SetProperty, null, target, new[] { value });
247247
#endif
248248
}
249249

@@ -272,7 +272,7 @@ public static void SetFieldValue([NotNull] this Type type, [NotNull] string fiel
272272
type.SetPropertyValue(fieldName, target, value);
273273
}
274274
#else
275-
type.InvokeMember(fieldName, BindingFlags.SetField | BindingFlags.SetProperty, null, target, new object[] { value });
275+
type.InvokeMember(fieldName, BindingFlags.SetField | BindingFlags.SetProperty, null, target, new[] { value });
276276
#endif
277277
}
278278

0 commit comments

Comments
 (0)