Skip to content

Commit

Permalink
Add modification for .NET Standard
Browse files Browse the repository at this point in the history
Add modification for .NET Standard
  • Loading branch information
JonathanMagnan committed Jul 11, 2018
1 parent 12491d6 commit 69f1b5c
Show file tree
Hide file tree
Showing 56 changed files with 259 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[Bb]in/
[Oo]bj/
[Pp]ackages/
.vs/
*.suo
*.user
*.userprefs
Expand Down
42 changes: 40 additions & 2 deletions Z.ExtensionMethods.Generated.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2035
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9C296DC8-C7D0-4D87-8F49-BC811C7C7C0C}"
EndProject
Expand Down Expand Up @@ -97,6 +97,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.Data.MyS
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.Data.SqlServerCe", "generated\Z.ExtensionMethods.Data.SqlServerCe\Z.ExtensionMethods.Data.SqlServerCe.csproj", "{23969445-2640-459E-AC0E-E2F991752B2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.NetStandard20", "generated\Z.ExtensionMethods.NetStandard20\Z.ExtensionMethods.NetStandard20.csproj", "{A22152F7-43AD-470C-8217-9DEDEB7DBBDB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.WithNamespace.NetStandard20", "generated\Z.ExtensionMethods.WithNamespace.NetStandard20\Z.ExtensionMethods.WithNamespace.NetStandard20.csproj", "{26821CEF-45EC-4EEA-98D2-CBBAB934D58F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.WithObjectNamespace.NetStandard20", "generated\Z.ExtensionMethods.WithObjectNamespace.NetStandard20\Z.ExtensionMethods.WithObjectNamespace.NetStandard20.csproj", "{58605969-97C9-4431-B0C0-B87AB7A620FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.WithOneNamespace.NetStandard20", "generated\Z.ExtensionMethods.WithOneNamespace.NetStandard20\Z.ExtensionMethods.WithOneNamespace.NetStandard20.csproj", "{2453F5E9-89E4-4ACB-A133-E0D0BE1A5B2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Z.ExtensionMethods.WithTwoNamespace.NetStandard20", "generated\Z.ExtensionMethods.WithTwoNamespace.NetStandard20\Z.ExtensionMethods.WithTwoNamespace.NetStandard20.csproj", "{AEE86AD6-4C8E-455D-B6CE-D6B614220DEB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -275,6 +285,26 @@ Global
{23969445-2640-459E-AC0E-E2F991752B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23969445-2640-459E-AC0E-E2F991752B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23969445-2640-459E-AC0E-E2F991752B2B}.Release|Any CPU.Build.0 = Release|Any CPU
{A22152F7-43AD-470C-8217-9DEDEB7DBBDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A22152F7-43AD-470C-8217-9DEDEB7DBBDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A22152F7-43AD-470C-8217-9DEDEB7DBBDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A22152F7-43AD-470C-8217-9DEDEB7DBBDB}.Release|Any CPU.Build.0 = Release|Any CPU
{26821CEF-45EC-4EEA-98D2-CBBAB934D58F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26821CEF-45EC-4EEA-98D2-CBBAB934D58F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26821CEF-45EC-4EEA-98D2-CBBAB934D58F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26821CEF-45EC-4EEA-98D2-CBBAB934D58F}.Release|Any CPU.Build.0 = Release|Any CPU
{58605969-97C9-4431-B0C0-B87AB7A620FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58605969-97C9-4431-B0C0-B87AB7A620FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58605969-97C9-4431-B0C0-B87AB7A620FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58605969-97C9-4431-B0C0-B87AB7A620FF}.Release|Any CPU.Build.0 = Release|Any CPU
{2453F5E9-89E4-4ACB-A133-E0D0BE1A5B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2453F5E9-89E4-4ACB-A133-E0D0BE1A5B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2453F5E9-89E4-4ACB-A133-E0D0BE1A5B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2453F5E9-89E4-4ACB-A133-E0D0BE1A5B2B}.Release|Any CPU.Build.0 = Release|Any CPU
{AEE86AD6-4C8E-455D-B6CE-D6B614220DEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEE86AD6-4C8E-455D-B6CE-D6B614220DEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEE86AD6-4C8E-455D-B6CE-D6B614220DEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEE86AD6-4C8E-455D-B6CE-D6B614220DEB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -307,5 +337,13 @@ Global
{A29A70F3-60DC-494F-98F2-90E33EE0FBD5} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{5B5E31BE-2921-48DF-A78F-898D29ED1C01} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{23969445-2640-459E-AC0E-E2F991752B2B} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{A22152F7-43AD-470C-8217-9DEDEB7DBBDB} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{26821CEF-45EC-4EEA-98D2-CBBAB934D58F} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{58605969-97C9-4431-B0C0-B87AB7A620FF} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{2453F5E9-89E4-4ACB-A133-E0D0BE1A5B2B} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
{AEE86AD6-4C8E-455D-B6CE-D6B614220DEB} = {234D0FBA-C701-4C89-A52D-1F41BCD58DC8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F05F4364-ACDF-43E4-BF27-621040293629}
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions src/Z.Caching/System.Object/Object.FromCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
using System.Linq.Expressions;
#if !NETSTANDARD
using System.Runtime.Caching;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>A TKey extension method that from cache.</summary>
/// <typeparam name="T">Generic type parameter.</typeparam>
/// <typeparam name="TValue">Type of the value.</typeparam>
Expand Down Expand Up @@ -88,4 +91,5 @@ public static TValue FromCache<TKey, TValue>(this TKey @this, MemoryCache cache,
string key = string.Concat("Z.Caching.FromCache;", typeof (TKey).FullName, valueFactory.ToString());
return @this.FromCache(cache, key, valueFactory);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Runtime.Caching;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>A MemoryCache extension method that adds an or get existing.</summary>
/// <typeparam name="TValue">Type of the value.</typeparam>
/// <param name="cache">The cache to act on.</param>
Expand Down Expand Up @@ -70,4 +73,5 @@ public static TValue AddOrGetExisting<TValue>(this MemoryCache cache, string key

return item.Value;
}
#endif
}
4 changes: 4 additions & 0 deletions src/Z.Core/System.ByteArray/ByteArray.ToImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
// License: https://github.com/zzzprojects/Z.ExtensionMethods/blob/master/LICENSE
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
#if !NETSTANDARD
using System.Drawing;
using System.IO;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// A byte[] extension method that converts the @this to an image.
/// </summary>
Expand All @@ -21,4 +24,5 @@ public static Image ToImage(this byte[] @this)
return Image.FromStream(ms);
}
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Web;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Encodes a byte array into its equivalent string representation using base 64 digits, which is usable for
/// transmission on the URL.
Expand All @@ -22,4 +25,5 @@ public static String UrlTokenEncode(this Byte[] input)
{
return HttpServerUtility.UrlTokenEncode(input);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
using System.Text;
#if !NETSTANDARD
using System.Web;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Converts a URL-encoded byte array into a decoded string using the specified decoding object.
/// </summary>
Expand All @@ -34,4 +37,5 @@ public static String UrlDecode(this Byte[] bytes, Int32 offset, Int32 count, Enc
{
return HttpUtility.UrlDecode(bytes, offset, count, e);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Web;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Converts a URL-encoded array of bytes into a decoded array of bytes.
/// </summary>
Expand All @@ -31,4 +34,5 @@ public static Byte[] UrlDecodeToBytes(this Byte[] bytes, Int32 offset, Int32 cou
{
return HttpUtility.UrlDecodeToBytes(bytes, offset, count);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Web;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Converts a byte array into an encoded URL string.
/// </summary>
Expand All @@ -31,4 +34,5 @@ public static String UrlEncode(this Byte[] bytes, Int32 offset, Int32 count)
{
return HttpUtility.UrlEncode(bytes, offset, count);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Web;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Converts an array of bytes into a URL-encoded array of bytes.
/// </summary>
Expand All @@ -31,4 +34,5 @@ public static Byte[] UrlEncodeToBytes(this Byte[] bytes, Int32 offset, Int32 cou
{
return HttpUtility.UrlEncodeToBytes(bytes, offset, count);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Drawing;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Creates a structure from a 32-bit ARGB value.
/// </summary>
Expand Down Expand Up @@ -64,4 +67,5 @@ public static Color FromArgb(this Int32 argb, Int32 green, Int32 blue)
{
return Color.FromArgb(argb, green, blue);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Drawing;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Translates an OLE color value to a GDI+ structure.
/// </summary>
Expand All @@ -18,4 +21,5 @@ public static Color FromOle(this Int32 oleColor)
{
return ColorTranslator.FromOle(oleColor);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Drawing;

#endif
public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Translates a Windows color value to a GDI+ structure.
/// </summary>
Expand All @@ -18,4 +20,5 @@ public static Color FromWin32(this Int32 win32Color)
{
return ColorTranslator.FromWin32(win32Color);
}
#endif
}
4 changes: 4 additions & 0 deletions src/Z.Core/System.String/String.ToPlural.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
// License: https://github.com/zzzprojects/Z.ExtensionMethods/blob/master/LICENSE
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
#if !NETSTANDARD
using System.Data.Entity.Design.PluralizationServices;
using System.Globalization;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// A string extension method that converts the @this to a plural.
/// </summary>
Expand All @@ -29,4 +32,5 @@ public static string ToPlural(this string @this, CultureInfo cultureInfo)
{
return PluralizationService.CreateService(cultureInfo).Pluralize(@this);
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Globalization;
using System.Reflection;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Creates an instance of the specified type using the constructor that best matches the specified parameters.
/// </summary>
Expand Down Expand Up @@ -127,4 +130,5 @@ public static Object CreateInstance(this Type type, Boolean nonPublic)
{
return Activator.CreateInstance(type, nonPublic);
}
#endif
}
2 changes: 2 additions & 0 deletions src/Z.Core/System.Type/System.Activator/Type.GetObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// Creates a proxy for the well-known object indicated by the specified type and URL.
/// </summary>
Expand All @@ -30,4 +31,5 @@ public static Object GetObject(this Type type, String url, Object state)
{
return Activator.GetObject(type, url, state);
}
#endif
}
4 changes: 4 additions & 0 deletions src/Z.Core/System.Type/Type.CreateInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
// More projects: http://www.zzzprojects.com/
// Copyright © ZZZ Projects Inc. 2014 - 2016. All rights reserved.
using System;
#if !NETSTANDARD
using System.Globalization;
using System.Reflection;
#endif

public static partial class Extensions
{
#if !NETSTANDARD
/// <summary>
/// A Type extension method that creates an instance.
/// </summary>
Expand Down Expand Up @@ -88,4 +91,5 @@ public static T CreateInstance<T>(this Type @this, Boolean nonPublic)
{
return (T) Activator.CreateInstance(@this, nonPublic);
}
#endif
}
Loading

0 comments on commit 69f1b5c

Please sign in to comment.