Skip to content

Commit 0d2b5e9

Browse files
Now .NET 4.6.1 and C# 6
1 parent 835fc7f commit 0d2b5e9

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

FF/ArgParser.cs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected ArgParser(String[] flagSymbols,
119119
#endif
120120
if ((null == flagSymbols) || (0 == flagSymbols.Length))
121121
{
122-
throw new ArgumentException(Constants.ArrayMustBeValid, "flagSymbols");
122+
throw new ArgumentException(Constants.ArrayMustBeValid, nameof(flagSymbols));
123123
}
124124

125125
Debug.Assert(null != switchChars, "null != switchChars");
@@ -133,7 +133,7 @@ protected ArgParser(String[] flagSymbols,
133133
#endif
134134
if ((null == switchChars) || (0 == switchChars.Length))
135135
{
136-
throw new ArgumentException(Constants.ArrayMustBeValid, "switchChars");
136+
throw new ArgumentException(Constants.ArrayMustBeValid, nameof(switchChars));
137137
}
138138

139139
this.flagSymbols = flagSymbols;
@@ -331,10 +331,7 @@ public Boolean Parse(String[] args)
331331
/// Every derived class must implement an OnSwitch method or a switch
332332
/// is considered an error.
333333
/// </remarks>
334-
protected virtual SwitchStatus OnSwitch(String switchSymbol, String switchValue)
335-
{
336-
return SwitchStatus.Error;
337-
}
334+
protected virtual SwitchStatus OnSwitch(String switchSymbol, String switchValue) => SwitchStatus.Error;
338335

339336
/// <summary>
340337
/// Called when a non-switch value is parsed out.
@@ -345,10 +342,7 @@ protected virtual SwitchStatus OnSwitch(String switchSymbol, String switchValue)
345342
/// <returns>
346343
/// One of the <see cref="SwitchStatus"/> values.
347344
/// </returns>
348-
protected virtual SwitchStatus OnNonSwitch(String value)
349-
{
350-
return SwitchStatus.Error;
351-
}
345+
protected virtual SwitchStatus OnNonSwitch(String value) => SwitchStatus.Error;
352346

353347
/// <summary>
354348
/// Called when parsing is finished so final sanity checking can be
@@ -357,11 +351,8 @@ protected virtual SwitchStatus OnNonSwitch(String value)
357351
/// <returns>
358352
/// One of the <see cref="SwitchStatus"/> values.
359353
/// </returns>
360-
protected virtual SwitchStatus OnDoneParse()
361-
{
362-
// By default, we'll assume that all parsing was an error.
363-
return SwitchStatus.Error;
364-
}
354+
// By default, we'll assume that all parsing was an error.
355+
protected virtual SwitchStatus OnDoneParse() => SwitchStatus.Error;
365356

366357
/// <summary>
367358
/// Looks to see if the switch is in the array.

FF/Constants.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FF/FF.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>FastFind</RootNamespace>
1111
<AssemblyName>FF</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -57,6 +58,7 @@
5758
<Compile Include="Properties\AssemblyInfo.cs" />
5859
</ItemGroup>
5960
<ItemGroup>
61+
<None Include="app.config" />
6062
<None Include="FF.ruleset">
6163
<SubType>Designer</SubType>
6264
</None>

FF/FF.sln

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2012
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.23107.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
46
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FF", "FF.csproj", "{0E90979C-C1C1-425B-86D1-B0BB9078EAAF}"
57
EndProject
68
Global

FF/FastFindArgumentParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public FastFindArgumentParser()
123123
/// <summary>
124124
/// Gets the patterns to search for.
125125
/// </summary>
126-
public List<Regex> Patterns { get; private set; }
126+
public List<Regex> Patterns { get; }
127127

128128
/// <summary>
129129
/// Reports correct command line usage.

0 commit comments

Comments
 (0)