Skip to content

Commit

Permalink
fixed nullable issue
Browse files Browse the repository at this point in the history
fixed deploy key
  • Loading branch information
morrisjdev committed Oct 29, 2019
1 parent 2bcdac4 commit 37922ff
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
1 change: 1 addition & 0 deletions FileContextCore/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FileContextCoreCert.pfx
8 changes: 4 additions & 4 deletions FileContextCore/FileContextCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<SignAssembly Condition="'$(OS)' == 'Windows_NT'">true</SignAssembly>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>FileContextCoreCert.pfx</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>3.0.0</Version>
<Version>3.0.1</Version>
<Company>morrisjdev</Company>
<Authors>morrisjdev</Authors>
<Description>File provider for Entity Framework Core (to be used for development purposes)</Description>
<Copyright>Copyright © Morris Janatzek</Copyright>
<Title>FileContextCore</Title>
<PackageLicenseUrl>https://raw.githubusercontent.com/morrisjdev/FileContextCore/master/LICENSE</PackageLicenseUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageIconUrl>https://morrisj.net/img/morrisjdev_logo.png</PackageIconUrl>
<RepositoryUrl>https://github.com/morrisjdev/FileContextCore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Entity Framework Core;entity-framework-core;EF;Data;O/RM;FileContext;FileDB;JSON;XML;CSV;ELSX;Excel</PackageTags>
<PackageProjectUrl>https://github.com/morrisjdev/FileContextCore</PackageProjectUrl>
<NeutralLanguage>en-US</NeutralLanguage>
<DelaySign>false</DelaySign>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>3.0.1.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion FileContextCore/FileContextCore.csproj.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>C:\Users\morri\Documents\Projects\productive\FileContextCore\FileContextCore\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
<_LastSelectedProfileId>C:\Users\mjanatzek\Documents\Projects\private\FileContextCore\FileContextCore\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.1\publish\</PublishDir>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
</PropertyGroup>
</Project>
24 changes: 17 additions & 7 deletions FileContextCore/Serializer/SerializerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,25 @@ static class SerializerHelper
{
public static object Deserialize(this string input, Type type)
{
type = Nullable.GetUnderlyingType(type) ?? type;

if (String.IsNullOrEmpty(input))
type = Nullable.GetUnderlyingType(type) ?? type;

if (string.IsNullOrEmpty(input))
{
return type.GetDefaultValue();
}

if (type == typeof(TimeSpan))
{
return TimeSpan.Parse(input, CultureInfo.InvariantCulture);
else if (type == typeof(Guid))

}

if (type == typeof(Guid))
{
return Guid.Parse(input);
else if (type.IsArray)
}

if (type.IsArray)
{
Type arrType = type.GetElementType();
List<object> arr = new List<object>();
Expand All @@ -34,8 +43,9 @@ public static object Deserialize(this string input, Type type)

return arr.ToArray();
}
else
return Convert.ChangeType(input, type, CultureInfo.InvariantCulture);


return Convert.ChangeType(input, type, CultureInfo.InvariantCulture);
}

public static string Serialize(this object input)
Expand Down
Binary file removed FileContextCore/key.snk
Binary file not shown.

0 comments on commit 37922ff

Please sign in to comment.