From 8add512b98d641ff59ffd19293539a0d543432f4 Mon Sep 17 00:00:00 2001 From: Nikolas Magno Date: Mon, 21 May 2018 20:37:26 -0300 Subject: [PATCH] Adicionando pacotes nuget --- Package.nuspec | 20 +++++++ WhenResponse.RestSharp.NetCore/Extension.cs | 16 +++++ .../WhenResponse.RestSharp.NetCore.csproj | 19 ++++++ .../Properties/AssemblyInfo.cs | 36 +++++++++++ .../WhenResponse.RestSharp.csproj | 60 ++++++++++++++++--- .../WhenResponse.RestSharp.csproj.nuspec | 19 ++++++ .../WhenResponse.RestSharp.nuspec | 17 ++++++ WhenResponse.RestSharp/packages.config | 4 ++ WhenResponse.Test/WhenResponse.Test.csproj | 2 +- WhenResponse.sln | 18 ++++-- 10 files changed, 197 insertions(+), 14 deletions(-) create mode 100644 Package.nuspec create mode 100644 WhenResponse.RestSharp.NetCore/Extension.cs create mode 100644 WhenResponse.RestSharp.NetCore/WhenResponse.RestSharp.NetCore.csproj create mode 100644 WhenResponse.RestSharp/Properties/AssemblyInfo.cs create mode 100644 WhenResponse.RestSharp/WhenResponse.RestSharp.csproj.nuspec create mode 100644 WhenResponse.RestSharp/WhenResponse.RestSharp.nuspec create mode 100644 WhenResponse.RestSharp/packages.config diff --git a/Package.nuspec b/Package.nuspec new file mode 100644 index 0000000..344f102 --- /dev/null +++ b/Package.nuspec @@ -0,0 +1,20 @@ + + + + Package + 1.0.0 + NikolasMagno + NikolasMagno + http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE + http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE + http://ICON_URL_HERE_OR_DELETE_THIS_LINE + false + Package description + Summary of changes made in this release of the package. + Copyright 2018 + Tag1 Tag2 + + + + + \ No newline at end of file diff --git a/WhenResponse.RestSharp.NetCore/Extension.cs b/WhenResponse.RestSharp.NetCore/Extension.cs new file mode 100644 index 0000000..3345afb --- /dev/null +++ b/WhenResponse.RestSharp.NetCore/Extension.cs @@ -0,0 +1,16 @@ +namespace WhenResponse.RestSharp +{ + using global::RestSharp; + using System; + + public static class Extension + { + public static IRestResponse When(this IRestResponse response, Func condition, Action action) + { + if (condition(response)) + action(response); + + return response; + } + } +} diff --git a/WhenResponse.RestSharp.NetCore/WhenResponse.RestSharp.NetCore.csproj b/WhenResponse.RestSharp.NetCore/WhenResponse.RestSharp.NetCore.csproj new file mode 100644 index 0000000..430c734 --- /dev/null +++ b/WhenResponse.RestSharp.NetCore/WhenResponse.RestSharp.NetCore.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp2.0 + true + A simple library to make response treatment clean and fluent +https://github.com/nikolasmagno/WhenResponse + https://github.com/nikolasmagno/WhenResponse + https://github.com/nikolasmagno/WhenResponse + https://github.com/nikolasmagno/WhenResponse + WhenResponse.RestSharp.NetCore + WhenResponse.RestSharp + + + + + + + diff --git a/WhenResponse.RestSharp/Properties/AssemblyInfo.cs b/WhenResponse.RestSharp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c0832b3 --- /dev/null +++ b/WhenResponse.RestSharp/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WhenResponse.RestSharp")] +[assembly: AssemblyDescription("A simple library to make response treatment clean and fluent")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("WhenResponse.RestSharp")] +[assembly: AssemblyProduct("WhenResponse.RestSharp")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d8c8681f-c978-47c3-a148-cec7ad05e25b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj b/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj index b694018..3c6a574 100644 --- a/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj +++ b/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj @@ -1,11 +1,57 @@ - - + + + - netcoreapp2.0 + Debug + AnyCPU + {D8C8681F-C978-47C3-A148-CEC7AD05E25B} + Library + Properties + WhenResponse.RestSharp + WhenResponse.RestSharp + v4.5 + 512 + - + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\packages\RestSharp.105.0.0\lib\net4\RestSharp.dll + + + + + + + + + + + + + - + + Designer + - - + + \ No newline at end of file diff --git a/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj.nuspec b/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj.nuspec new file mode 100644 index 0000000..3089b34 --- /dev/null +++ b/WhenResponse.RestSharp/WhenResponse.RestSharp.csproj.nuspec @@ -0,0 +1,19 @@ + + + + .\WhenResponse.RestSharp\WhenResponse.RestSharp.csproj + 1.0.0 + NikolasMagno + NikolasMagno + https://github.com/nikolasmagno/WhenResponse + https://github.com/nikolasmagno/WhenResponse + false + A simple library to make response treatment clean and fluent + A simple library to make response treatment clean and fluent + Copyright 2018 + Tag1 Tag2 + + + + + \ No newline at end of file diff --git a/WhenResponse.RestSharp/WhenResponse.RestSharp.nuspec b/WhenResponse.RestSharp/WhenResponse.RestSharp.nuspec new file mode 100644 index 0000000..d8d1fa4 --- /dev/null +++ b/WhenResponse.RestSharp/WhenResponse.RestSharp.nuspec @@ -0,0 +1,17 @@ + + + + $id$ + $version$ + $title$ + Nikolas Magno + Nikolas Magno + https://github.com/nikolasmagno/WhenResponse + https://github.com/nikolasmagno/WhenResponse + false + A simple library to make response treatment clean and fluent + A simple library to make response treatment clean and fluent + Copyright 2018 + Rest RestSharp + + \ No newline at end of file diff --git a/WhenResponse.RestSharp/packages.config b/WhenResponse.RestSharp/packages.config new file mode 100644 index 0000000..1f09a7e --- /dev/null +++ b/WhenResponse.RestSharp/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/WhenResponse.Test/WhenResponse.Test.csproj b/WhenResponse.Test/WhenResponse.Test.csproj index 4ed2211..46b87bc 100644 --- a/WhenResponse.Test/WhenResponse.Test.csproj +++ b/WhenResponse.Test/WhenResponse.Test.csproj @@ -14,7 +14,7 @@ - + diff --git a/WhenResponse.sln b/WhenResponse.sln index 219618f..112a8ee 100644 --- a/WhenResponse.sln +++ b/WhenResponse.sln @@ -3,9 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27428.2037 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhenResponse.RestSharp", "WhenResponse.RestSharp\WhenResponse.RestSharp.csproj", "{01BE7116-9803-4289-B39D-AD57DEC02BDD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WhenResponse.Test", "WhenResponse.Test\WhenResponse.Test.csproj", "{654BC4A8-087F-4700-BE52-1FAD94C58399}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhenResponse.Test", "WhenResponse.Test\WhenResponse.Test.csproj", "{654BC4A8-087F-4700-BE52-1FAD94C58399}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WhenResponse.RestSharp.NetCore", "WhenResponse.RestSharp.NetCore\WhenResponse.RestSharp.NetCore.csproj", "{34BB1CD5-E19A-402E-B552-DAFB9A94B0D9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhenResponse.RestSharp", "WhenResponse.RestSharp\WhenResponse.RestSharp.csproj", "{D8C8681F-C978-47C3-A148-CEC7AD05E25B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,14 +15,18 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {01BE7116-9803-4289-B39D-AD57DEC02BDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01BE7116-9803-4289-B39D-AD57DEC02BDD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {01BE7116-9803-4289-B39D-AD57DEC02BDD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01BE7116-9803-4289-B39D-AD57DEC02BDD}.Release|Any CPU.Build.0 = Release|Any CPU {654BC4A8-087F-4700-BE52-1FAD94C58399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {654BC4A8-087F-4700-BE52-1FAD94C58399}.Debug|Any CPU.Build.0 = Debug|Any CPU {654BC4A8-087F-4700-BE52-1FAD94C58399}.Release|Any CPU.ActiveCfg = Release|Any CPU {654BC4A8-087F-4700-BE52-1FAD94C58399}.Release|Any CPU.Build.0 = Release|Any CPU + {34BB1CD5-E19A-402E-B552-DAFB9A94B0D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34BB1CD5-E19A-402E-B552-DAFB9A94B0D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34BB1CD5-E19A-402E-B552-DAFB9A94B0D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34BB1CD5-E19A-402E-B552-DAFB9A94B0D9}.Release|Any CPU.Build.0 = Release|Any CPU + {D8C8681F-C978-47C3-A148-CEC7AD05E25B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8C8681F-C978-47C3-A148-CEC7AD05E25B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8C8681F-C978-47C3-A148-CEC7AD05E25B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8C8681F-C978-47C3-A148-CEC7AD05E25B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE