diff options
Diffstat (limited to 'csharp/src')
19 files changed, 227 insertions, 15 deletions
diff --git a/csharp/src/Glacier2/msbuild/net5.0/glacier2.csproj b/csharp/src/Glacier2/msbuild/net5.0/glacier2.csproj new file mode 100644 index 00000000000..283eb665369 --- /dev/null +++ b/csharp/src/Glacier2/msbuild/net5.0/glacier2.csproj @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>Glacier2</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../Ice/msbuild/net5.0/ice.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/Ice/AssemblyUtil.cs b/csharp/src/Ice/AssemblyUtil.cs index a594b1d6d6a..44b44b1e95e 100644 --- a/csharp/src/Ice/AssemblyUtil.cs +++ b/csharp/src/Ice/AssemblyUtil.cs @@ -12,7 +12,7 @@ namespace IceInternal public sealed class AssemblyUtil { -#if NETSTANDARD2_0 +#if NET5_0 || NETSTANDARD2_0 public static readonly bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); public static readonly bool isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); public static readonly bool isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); diff --git a/csharp/src/Ice/DispatchInterceptor.cs b/csharp/src/Ice/DispatchInterceptor.cs index 54e39251ac6..52685fa6c86 100644 --- a/csharp/src/Ice/DispatchInterceptor.cs +++ b/csharp/src/Ice/DispatchInterceptor.cs @@ -37,7 +37,9 @@ namespace Ice // encoding version used by the client to eventually marshal the user exception. It's also needed // if we dispatch a batch oneway request to read the next batch request. // - if(current.encoding == null || (current.encoding.major == 0 && current.encoding.minor == 0)) +#pragma warning disable CS8073 // The result of the expression is always 'false' + if (current.encoding == null || (current.encoding.major == 0 && current.encoding.minor == 0)) +#pragma warning restore CS8073 // The result of the expression is always 'false' { inc.skipReadParams(); } diff --git a/csharp/src/Ice/InputStream.cs b/csharp/src/Ice/InputStream.cs index d71f3bd01ff..eafd7e5b843 100644 --- a/csharp/src/Ice/InputStream.cs +++ b/csharp/src/Ice/InputStream.cs @@ -1097,7 +1097,9 @@ namespace Ice try { var f = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.All, _instance)); +#pragma warning disable SYSLIB0011 // Type or member is obsolete return f.Deserialize(new IceInternal.InputStreamWrapper(sz, this)); +#pragma warning restore SYSLIB0011 // Type or member is obsolete } catch(System.Exception ex) { diff --git a/csharp/src/Ice/ObjectAdapterFactory.cs b/csharp/src/Ice/ObjectAdapterFactory.cs index ca991d86dde..f87420105ff 100644 --- a/csharp/src/Ice/ObjectAdapterFactory.cs +++ b/csharp/src/Ice/ObjectAdapterFactory.cs @@ -175,15 +175,15 @@ namespace IceInternal _adapters.Add(adapter); } } - catch(Ice.CommunicatorDestroyedException ex) + catch(Ice.CommunicatorDestroyedException) { if(adapter != null) { adapter.destroy(); } - throw ex; + throw; } - catch(Ice.LocalException ex) + catch(Ice.LocalException) { if(name.Length > 0) { @@ -192,7 +192,7 @@ namespace IceInternal _adapterNamesInUse.Remove(name); } } - throw ex; + throw; } return adapter; diff --git a/csharp/src/Ice/Optional.cs b/csharp/src/Ice/Optional.cs index cbcdecfb929..4bfe510ee88 100644 --- a/csharp/src/Ice/Optional.cs +++ b/csharp/src/Ice/Optional.cs @@ -121,10 +121,6 @@ namespace Ice public override bool Equals(object other) { - if(ReferenceEquals(this, other)) - { - return true; - } if(other == null) { return false; diff --git a/csharp/src/Ice/OutputStream.cs b/csharp/src/Ice/OutputStream.cs index d87491b83f4..bf79911e643 100644 --- a/csharp/src/Ice/OutputStream.cs +++ b/csharp/src/Ice/OutputStream.cs @@ -727,7 +727,9 @@ namespace Ice { IceInternal.OutputStreamWrapper w = new IceInternal.OutputStreamWrapper(this); IFormatter f = new BinaryFormatter(); +#pragma warning disable SYSLIB0011 // Type or member is obsolete f.Serialize(w, o); +#pragma warning restore SYSLIB0011 // Type or member is obsolete w.Close(); } catch(System.Exception ex) diff --git a/csharp/src/Ice/PluginManagerI.cs b/csharp/src/Ice/PluginManagerI.cs index b773ba595cb..8e841ab230d 100644 --- a/csharp/src/Ice/PluginManagerI.cs +++ b/csharp/src/Ice/PluginManagerI.cs @@ -451,7 +451,9 @@ namespace Ice } catch(System.IO.IOException) { +#pragma warning disable CA2200 // Rethrow to preserve stack details throw ex; +#pragma warning restore CA2200 // Rethrow to preserve stack details } } } diff --git a/csharp/src/Ice/msbuild/net5.0/ice.csproj b/csharp/src/Ice/msbuild/net5.0/ice.csproj new file mode 100644 index 00000000000..c37215f6906 --- /dev/null +++ b/csharp/src/Ice/msbuild/net5.0/ice.csproj @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>Ice</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/Ice/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All" /> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-20204-02" PrivateAssets="All" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets" /> +</Project> diff --git a/csharp/src/IceBox/ServiceManagerI.cs b/csharp/src/IceBox/ServiceManagerI.cs index 68b47540f31..bd0ef6e72ff 100644 --- a/csharp/src/IceBox/ServiceManagerI.cs +++ b/csharp/src/IceBox/ServiceManagerI.cs @@ -492,8 +492,10 @@ class ServiceManagerI : ServiceManagerDisp_ } catch(Exception) { - throw ex; - } +#pragma warning disable CA2200 // Rethrow to preserve stack details + throw ex; +#pragma warning restore CA2200 // Rethrow to preserve stack details + } } } catch(Exception ex) diff --git a/csharp/src/IceBox/msbuild/icebox/net5.0/icebox.csproj b/csharp/src/IceBox/msbuild/icebox/net5.0/icebox.csproj new file mode 100644 index 00000000000..43eaea51f5e --- /dev/null +++ b/csharp/src/IceBox/msbuild/icebox/net5.0/icebox.csproj @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <OutputType>Exe</OutputType> + <AssemblyName>iceboxnet</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../../bin</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <PropertyGroup> + <UseAppHost>true</UseAppHost> + </PropertyGroup> + <ItemGroup> + <Compile Include="../../../AssemblyInfoExe.cs" /> + <Compile Include="../../../Server.cs" /> + <Compile Include="../../../ServiceManagerI.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../../Ice/msbuild/net5.0/ice.csproj" /> + <ProjectReference Include="../../../../IceSSL/msbuild/net5.0/icessl.csproj" /> + <ProjectReference Include="../../iceboxlib/net5.0/iceboxlib.csproj" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/IceBox/msbuild/iceboxlib/net5.0/iceboxlib.csproj b/csharp/src/IceBox/msbuild/iceboxlib/net5.0/iceboxlib.csproj new file mode 100644 index 00000000000..6537c509d68 --- /dev/null +++ b/csharp/src/IceBox/msbuild/iceboxlib/net5.0/iceboxlib.csproj @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>IceBox</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../../slice/IceBox/IceBox.ice" /> + <Compile Include="../../../AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../../Ice/msbuild/net5.0/ice.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/IceDiscovery/msbuild/net5.0/icediscovery.csproj b/csharp/src/IceDiscovery/msbuild/net5.0/icediscovery.csproj new file mode 100644 index 00000000000..5dfd41b7540 --- /dev/null +++ b/csharp/src/IceDiscovery/msbuild/net5.0/icediscovery.csproj @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>IceDiscovery</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../Ice/msbuild/net5.0/ice.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/IceDiscovery/msbuild/netstandard2.0/icediscovery.csproj b/csharp/src/IceDiscovery/msbuild/netstandard2.0/icediscovery.csproj index b0ecf5bf049..6435ea0679b 100644 --- a/csharp/src/IceDiscovery/msbuild/netstandard2.0/icediscovery.csproj +++ b/csharp/src/IceDiscovery/msbuild/netstandard2.0/icediscovery.csproj @@ -5,7 +5,7 @@ <AssemblyName>IceDiscovery</AssemblyName> <Version>$(IceVersion)</Version> <OutputPath>../../../../lib</OutputPath> - <TargetFrameworks>netstandard2.0</TargetFrameworks> + <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> diff --git a/csharp/src/IceGrid/msbuild/net5.0/icegrid.csproj b/csharp/src/IceGrid/msbuild/net5.0/icegrid.csproj new file mode 100644 index 00000000000..06a244f968d --- /dev/null +++ b/csharp/src/IceGrid/msbuild/net5.0/icegrid.csproj @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>IceGrid</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../Ice/msbuild/net5.0/ice.csproj" /> + <ProjectReference Include="../../../Glacier2/msbuild/net5.0/glacier2.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/IceLocatorDiscovery/msbuild/net5.0/icelocatordiscovery.csproj b/csharp/src/IceLocatorDiscovery/msbuild/net5.0/icelocatordiscovery.csproj new file mode 100644 index 00000000000..9ad031a957a --- /dev/null +++ b/csharp/src/IceLocatorDiscovery/msbuild/net5.0/icelocatordiscovery.csproj @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>IceLocatorDiscovery</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../Ice/msbuild/net5.0/ice.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/IceSSL/SSLEngine.cs b/csharp/src/IceSSL/SSLEngine.cs index 34b381ac3ca..15fdbac1ceb 100644 --- a/csharp/src/IceSSL/SSLEngine.cs +++ b/csharp/src/IceSSL/SSLEngine.cs @@ -75,7 +75,9 @@ namespace IceSSL _protocols = 0; foreach(int v in Enum.GetValues(typeof(SslProtocols))) { - if(v > (int)SslProtocols.Ssl3 && v != (int)SslProtocols.Default) +#pragma warning disable CS0618 // Type or member is obsolete + if (v > (int)SslProtocols.Ssl3 && v != (int)SslProtocols.Default) +#pragma warning restore CS0618 // Type or member is obsolete { _protocols |= (SslProtocols)v; } @@ -637,9 +639,11 @@ namespace IceSSL private SslProtocols parseProtocols(string[] arr) { +#pragma warning disable CS0618 // Type or member is obsolete SslProtocols result = SslProtocols.Default; +#pragma warning restore CS0618 // Type or member is obsolete - if(arr.Length > 0) + if (arr.Length > 0) { result = 0; for(int i = 0; i < arr.Length; ++i) diff --git a/csharp/src/IceSSL/msbuild/net5.0/icessl.csproj b/csharp/src/IceSSL/msbuild/net5.0/icessl.csproj new file mode 100644 index 00000000000..6d0e578cf97 --- /dev/null +++ b/csharp/src/IceSSL/msbuild/net5.0/icessl.csproj @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>IceSSL</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../Ice/msbuild/net5.0/ice.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets"/> +</Project> diff --git a/csharp/src/IceStorm/msbuild/net5.0/icestorm.csproj b/csharp/src/IceStorm/msbuild/net5.0/icestorm.csproj new file mode 100644 index 00000000000..1e9fcd4433d --- /dev/null +++ b/csharp/src/IceStorm/msbuild/net5.0/icestorm.csproj @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + <Import Project="../../../../msbuild/ice.common.props" /> + <PropertyGroup> + <AssemblyName>IceStorm</AssemblyName> + <Version>$(IceVersion)</Version> + <OutputPath>../../../../lib</OutputPath> + <TargetFramework>net5.0</TargetFramework> + </PropertyGroup> + <ItemGroup> + <SliceCompile Include="../../../../../slice/$(AssemblyName)/*.ice" /> + <Compile Include="../../*.cs" /> + </ItemGroup> + <ItemGroup> + <PackageReference Include="zeroc.icebuilder.msbuild" Version="5.0.4" PrivateAssets="All"/> + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="../../../Ice/msbuild/net5.0/ice.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildThisFileDirectory)../../../../msbuild/ice.sign.targets"/> +</Project> |