Skip to content

Commit

Permalink
Code cleanup, 1.1.0 release preparation.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvk committed Sep 7, 2016
1 parent 4300e84 commit cc04cf0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
16 changes: 8 additions & 8 deletions CodeJam.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=TailRecursiveCall/@EntryIndexedValue">WARNING</s:String>
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/SuppressVsSquiggles/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=CodeJam_0020Cleanup/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="CodeJam Cleanup"&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;CSharpFormatDocComments&gt;True&lt;/CSharpFormatDocComments&gt;&lt;/Profile&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_DOWHILE/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FIXED/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_LOCK/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_USING/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_DOWHILE/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FIXED/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_LOCK/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_USING/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Explicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Explicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/MODIFIERS_ORDER/@EntryValue">public protected internal private abstract virtual sealed override static readonly extern unsafe volatile new async</s:String>
Expand Down Expand Up @@ -205,10 +205,10 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/CodeIssueFilter/IssueTypesToHide/=_003CConfigurableSeverity_0020Id_003D_0022Xaml_002EIgnoredPathHighlighting_0022_0020_002F_003E/@EntryIndexedValue">DoShow</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/CodeIssueFilter/IssueTypesToHide/=_003CConfigurableSeverity_0020Id_003D_0022Xaml_002EMappedPathHighlighting_0022_0020_002F_003E/@EntryIndexedValue">DoShow</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/CodeIssueFilter/IssueTypesToHide/=_003CStaticSeverity_0020Severity_003D_0022_002D1_0022_0020Title_003D_0022Structural_0020Search_0020Pattern_0022_0020GroupId_003D_0022StructuralSearch_0022_0020_002F_003E/@EntryIndexedValue">DoShow</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">RequiredForMultiline</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">NotRequiredForBoth</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">NotRequired</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/PARENTHESES_NON_OBVIOUS_OPERATIONS/@EntryValue">Shift, Bitwise, Lowest</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue">False</s:Boolean>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AROUND_AUTO_PROPERTY/@EntryValue">0</s:Int64>
Expand Down
2 changes: 1 addition & 1 deletion Main/nuget/CodeJam.Main.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>CodeJam</id>
<version>1.1.0-rc2</version>
<version>1.1.0</version>
<title>CodeJam .NET Library</title>
<authors>andrewvk</authors>
<licenseUrl>https://github.com/rsdn/CodeJam/blob/master/LICENSE</licenseUrl>
Expand Down
4 changes: 4 additions & 0 deletions Main/nuget/Readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CodeJam 1.1.0-rc2 Release Notes
-------------------------------

What's new in 1.1.0
-----------------------
* Code cleanup

What's new in 1.1.0-rc2
-----------------------
* Contains and ContainsSuffix methods in SuffixTree
Expand Down
1 change: 1 addition & 0 deletions Main/src/ExceptionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static class ExceptionExtensions
/// <returns>Detailed exception text.</returns>
public static StringBuilder ToDiagnosticString(this Exception exception, StringBuilder stringBuilder)
{
// ReSharper disable once PossibleNullReferenceException
for (var ex = exception; ex != null; ex = ex.InnerException)
{
var exceptionText = $"Exception: {ex.GetType()}";
Expand Down
5 changes: 3 additions & 2 deletions Main/src/Expressions/ExpressionExtensions.GetMembers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ public static ConstructorInfo GetConstructor([NotNull] this LambdaExpression exp
public static MethodInfo GetMethod([NotNull] this LambdaExpression expression)
{
var info = GetMemberInfo(expression);
var propertyInfo = info as PropertyInfo;
return
info is PropertyInfo
? ((PropertyInfo)info).GetGetMethod(true)
propertyInfo != null
? propertyInfo.GetGetMethod(true)
: (MethodInfo)info;
}

Expand Down
2 changes: 0 additions & 2 deletions Main/src/Mapping/MappingSchemaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public bool InitGenericConvertProvider(Type[] types)
if (_genericConvertProviders != null)
{
lock (_genericConvertProviders)
{
foreach (var type in _genericConvertProviders)
{
var args = type.Key.GetGenericArguments();
Expand All @@ -74,7 +73,6 @@ public bool InitGenericConvertProvider(Type[] types)
changed = true;
}
}
}
}

return changed;
Expand Down
3 changes: 2 additions & 1 deletion Main/src/Structures/Option/Option`1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public bool Equals([CanBeNull] Option<T> other)
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
return obj is Option<T> && Equals((Option<T>)obj);
var a = obj as Option<T>;
return a != null && Equals(a);
}

/// <summary>Returns the hash code for this instance.</summary>
Expand Down

0 comments on commit cc04cf0

Please sign in to comment.