Update vers 101: NON FA serializzaizone eccezione + test ok x timeout

This commit is contained in:
Samuele E. Locatelli
2019-04-30 13:06:41 +02:00
parent 959f5ac985
commit dfedf2fbbb
10 changed files with 9 additions and 23 deletions
+5 -5
View File
@@ -1817,11 +1817,12 @@ namespace MConnectSDK
}
catch (Exception exc)
{
string excSel = JsonConvert.SerializeObject(exc);
resp.error = excSel;
// la loggo al posto di "embeddarla
Log.Instance.Error(exc, "Sollevata eccezione in TryUpLoadFile: ");
// rilancio eccezione a monte...
throw;
}
if (resp != null)
{
// creo un nuovo result x embeddare il payload del risultato del caricamento file...
@@ -1841,10 +1842,9 @@ namespace MConnectSDK
}
else
{
risultato.error = new ErrorResult()
{
code = 400,
code = 000,
message = resp.error
};
}
-12
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -34,9 +33,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=3.3.3.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.3\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
@@ -84,12 +80,4 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.3\build\Costura.Fody.props'))" />
<Error Condition="!Exists('..\packages\Fody.4.2.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.2.1\build\Fody.targets'))" />
</Target>
<Import Project="..\packages\Fody.4.2.1\build\Fody.targets" Condition="Exists('..\packages\Fody.4.2.1\build\Fody.targets')" />
</Project>
+2 -2
View File
@@ -101,7 +101,7 @@ namespace MConnectSDK
public static async Task<string> getPageAsync(string pageURL)
{
string currUrl = pageURL;
if(currUrl.IndexOf("token")>=0)
if (currUrl.IndexOf("token") >= 0)
{
currUrl = currUrl.Substring(0, currUrl.IndexOf("token"));
}
@@ -259,7 +259,7 @@ namespace MConnectSDK
{
using (var client = new HttpClient())
{
// imposto a 15 minutiupload timeout!
// imposto a 15 minutiupload timeout!
TimeSpan ts = new TimeSpan(0, 15, 0);
client.Timeout = ts;
client.MaxResponseContentBufferSize = fileContent.Length + 1024;
-2
View File
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="3.3.3" targetFramework="net462" />
<package id="Fody" version="4.2.1" targetFramework="net462" developmentDependency="true" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net462" />
<package id="NLog" version="4.6.2" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="1.1.11" targetFramework="net462" />
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -8,5 +8,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("Copyright © Steamware 2019")]
[assembly: AssemblyTrademark("_")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.1.1904.99")]
[assembly: AssemblyFileVersion("1.1.1904.99")]
[assembly: AssemblyVersion("1.1.1904.101")]
[assembly: AssemblyFileVersion("1.1.1904.101")]