Skip to content

Commit 41066b2

Browse files
authored
Release/v1.0.1 (#2)
* - release v1.0.1
1 parent 2a84a7e commit 41066b2

10 files changed

+33
-18
lines changed

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
next-version: 1.0.0
1+
next-version: 1.0.1
22
tag-prefix: '[vV]'
33
mode: ContinuousDeployment
44
branches:

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
# <img src="https://github.com/CodeShayk/parsley.net/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> Parsley.Net v1.0.0
1+
# <img src="https://github.com/CodeShayk/parsley.net/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> Parsley.Net v1.0.1
22
[![NuGet version](https://badge.fury.io/nu/Parsley.Net.svg)](https://badge.fury.io/nu/Parsley.Net) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/CodeShayk/Parsley.Net/blob/master/LICENSE.md)
33
[![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/Parsley.Net?logo=github&sort=semver)](https://github.com/CodeShayk/Parsley.Net/releases/latest)
44
[![master-build](https://github.com/CodeShayk/parsley.net/actions/workflows/Master-Build.yml/badge.svg)](https://github.com/CodeShayk/parsley.net/actions/workflows/Master-Build.yml)
55
[![master-codeql](https://github.com/CodeShayk/parsley.net/actions/workflows/Master-CodeQL.yml/badge.svg)](https://github.com/CodeShayk/parsley.net/actions/workflows/Master-CodeQL.yml)
66
[![.Net 9.0](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)
7+
[![.Net Framework 4.6.4](https://img.shields.io/badge/.Net-4.6.2-blue)](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net46)
8+
[![.Net Standard 2.0](https://img.shields.io/badge/.NetStandard-2.0-blue)](https://github.com/dotnet/standard/blob/v2.0.0/docs/versions/netstandard2.0.md)
79

810
## Introduction
911
### What is Parsley.Net?

src/Parsley/ColumnAttribute.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System;
2+
13
namespace parsley
24
{
35
public class ColumnAttribute : Attribute

src/Parsley/CustomConverter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
using System;
12
using System.ComponentModel;
23
using System.Globalization;
34

45
namespace parsley
56
{
6-
public class CustomConverter<T> : TypeConverter where T: ICustomType, new()
7+
public class CustomConverter<T> : TypeConverter where T : ICustomType, new()
78
{
89
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
910
{

src/Parsley/Extensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Collections.Generic;
2+
13
namespace parsley
24
{
35
internal static class Extensions

src/Parsley/ICustomType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace parsley
22
{
33
public interface ICustomType
44
{
5-
public ICustomType Parse(string column);
5+
ICustomType Parse(string column);
66
}
77
}

src/Parsley/IFileLine.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
using System.Collections.Generic;
2+
13
namespace parsley
24
{
35
public interface IFileLine
46
{
5-
public int Index { get; set; }
6-
public IList<string> Errors { get; set; }
7+
int Index { get; set; }
8+
IList<string> Errors { get; set; }
79
}
810
}

src/Parsley/IParser.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ namespace parsley
22
{
33
public interface IParser
44
{
5-
public T[] Parse<T>(string filepath) where T : IFileLine, new();
6-
7-
public T[] Parse<T>(string[] lines) where T : IFileLine, new();
5+
T[] Parse<T>(string filepath) where T : IFileLine, new();
6+
7+
T[] Parse<T>(string[] lines) where T : IFileLine, new();
88
}
99
}

src/Parsley/Parser.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
13
using System.ComponentModel;
4+
using System.IO;
5+
using System.Linq;
26
using System.Reflection;
7+
using System.Threading.Tasks;
38

49
namespace parsley
510
{
@@ -19,7 +24,7 @@ public Parser(char delimiter)
1924
public T[] Parse<T>(string filepath) where T : IFileLine, new()
2025
{
2126
if (string.IsNullOrEmpty(filepath) || !File.Exists(filepath))
22-
return [];
27+
return Array.Empty<T>();
2328

2429
var lines = ReadToLines(filepath);
2530

@@ -29,7 +34,8 @@ public Parser(char delimiter)
2934
public T[] Parse<T>(string[] lines) where T : IFileLine, new()
3035
{
3136
if (lines == null || lines.Length == 0)
32-
return [];
37+
return Array.Empty<T>();
38+
;
3339

3440
var list = new T[lines.Length];
3541

@@ -70,7 +76,7 @@ private string[] ReadToLines(string path)
7076
lines.Add(line);
7177
}
7278

73-
return lines.ToArray();
79+
return lines.ToArray<string>();
7480
}
7581

7682
private T ParseLine<T>(string line) where T : IFileLine, new()

src/Parsley/Parsley.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
3+
<PropertyGroup>
4+
<TargetFrameworks>net462; netstandard2.0;netstandard2.1; net9.0</TargetFrameworks>
5+
<ImplicitUsings>disable</ImplicitUsings>
76
<Title>Parsley.Net</Title>
87
<Authors>CodeShayk</Authors>
98
<Company>CodeShayk</Company>
@@ -20,9 +19,10 @@
2019
<GenerateDocumentationFile>True</GenerateDocumentationFile>
2120
<PackageProjectUrl>https://github.com/CodeShayk/Parsley.Net/wiki</PackageProjectUrl>
2221
<RepositoryUrl>https://github.com/CodeShayk/Parsley.Net</RepositoryUrl>
23-
<PackageReleaseNotes>v1.0 - Targets .Net9.0
22+
<PackageReleaseNotes>
23+
v1.0.1 - Targets .Net9.0, .NetStandard2.1, .NetStandard2.0, and .NetFramework4.6.4. <br/>
2424
* Includes core functionality for parsing delimiter separated files.</PackageReleaseNotes>
25-
<Version>1.0.0</Version>
25+
<Version>1.0.1</Version>
2626
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
2727
<AssemblyName>Parsley.Net</AssemblyName>
2828
</PropertyGroup>

0 commit comments

Comments
 (0)