Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for .NET Standard 2.1 #234

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/IniParser/IniDataParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.IO;
using IniParser.Parser;
using IniParser.Model;
using static IniParser.Parser.StringBuffer;

namespace IniParser
{
Expand Down Expand Up @@ -246,7 +245,7 @@ protected virtual bool ProcessComment(StringBuffer currentLine)
// the comment delimiter
var startIdx = commentRange.start + Scheme.CommentString.Length;
var size = currentLineTrimmed.Count - Scheme.CommentString.Length;
var range = Range.FromIndexWithSize(startIdx, size);
var range = StringBuffer.Range.FromIndexWithSize(startIdx, size);

var comment = currentLineTrimmed.Substring(range);
if (Configuration.TrimComments)
Expand Down Expand Up @@ -345,10 +344,10 @@ protected virtual bool ProcessProperty(StringBuffer currentLine, IniData iniData

if (propertyAssigmentIdx.IsEmpty) return false;

var keyRange = Range.WithIndexes(0, propertyAssigmentIdx.start - 1);
var keyRange = StringBuffer.Range.WithIndexes(0, propertyAssigmentIdx.start - 1);
var valueStartIdx = propertyAssigmentIdx.end + 1;
var valueSize = currentLine.Count - propertyAssigmentIdx.end - 1;
var valueRange = Range.FromIndexWithSize(valueStartIdx, valueSize);
var valueRange = StringBuffer.Range.FromIndexWithSize(valueStartIdx, valueSize);

var key = currentLine.Substring(keyRange);
var value = currentLine.Substring(valueRange);
Expand Down
10 changes: 7 additions & 3 deletions src/IniParser/IniParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Also implements merging operations, both for complete ini files, sections, or ev
<Authors>Ricardo Amores Hernández</Authors>
<PackageProjectUrl>https://github.com/rickyah/ini-parser</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://raw.githubusercontent.com/rickyah/ini-parser/development/nuget-ini-icon.png</PackageIconUrl>
<PackageIcon>nuget-ini-icon.png</PackageIcon>
<Version>3.0</Version>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>Properties\publickey.snk</AssemblyOriginatorKeyFile>
Expand All @@ -24,10 +24,14 @@ Also implements merging operations, both for complete ini files, sections, or ev
<Product>INI Parser</Product>
<ReleaseVersion></ReleaseVersion>
</PropertyGroup>


<ItemGroup>
<None Include="../../nuget-ini-icon.png" Pack="true" PackagePath=""/>
</ItemGroup>

<!-- Auto-select supported target frameworks based on MSBuild version -->
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<RepositoryUrl>https://github.com/rickyah/ini-parser</RepositoryUrl>
<Copyright>Ricardo Amores Hernández 2009-2019</Copyright>
</PropertyGroup>
Expand Down