diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-03-06 18:20:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 18:20:51 +0300 |
commit | cacc9b7c4cc84ab110ca93ede0be7f5d82d25b1d (patch) | |
tree | 710f0c1b281e30d750df56108ceda7129cee8e6d /mcs/class/Facades | |
parent | 2b761f9ea5e6f76afc896569fec8acbf85357c70 (diff) |
[Facades] Add typeforwarders for DispatchProxy and TypeExtensions (#13325)
* [Facades] Add typeforwarders for DispatchProxy and TypeExtensions
DispatchProxy lives in System.Core for all profiles since https://github.com/mono/mono/pull/13198.
TypeExtensions live in corlib since https://github.com/mono/mono/pull/9746.
* Bump API snapshot submodule
* [csproj] Update project files
Diffstat (limited to 'mcs/class/Facades')
9 files changed, 34 insertions, 71 deletions
diff --git a/mcs/class/Facades/System.Reflection.DispatchProxy/Facades_System.Reflection.DispatchProxy.csproj b/mcs/class/Facades/System.Reflection.DispatchProxy/Facades_System.Reflection.DispatchProxy.csproj index ff426b3c90f..a778a1a7705 100644 --- a/mcs/class/Facades/System.Reflection.DispatchProxy/Facades_System.Reflection.DispatchProxy.csproj +++ b/mcs/class/Facades/System.Reflection.DispatchProxy/Facades_System.Reflection.DispatchProxy.csproj @@ -93,14 +93,14 @@ <!-- @BUILT_SOURCES@ --> <!--Common files--> <ItemGroup> - <Compile Include="..\..\..\build\common\MonoTODOAttribute.cs" /> <Compile Include="AssemblyInfo.cs" /> - <Compile Include="System.Reflection\DispatchProxy.cs" /> + <Compile Include="TypeForwarders.cs" /> </ItemGroup> <!--End of common files--> <!-- @ALL_SOURCES@ --> <ItemGroup> <ProjectReference Include="../../System/System.csproj" /> + <ProjectReference Include="../../System.Core/System.Core.csproj" /> <ProjectReference Include="../../corlib/corlib.csproj" /> </ItemGroup> <ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' "> diff --git a/mcs/class/Facades/System.Reflection.DispatchProxy/Makefile b/mcs/class/Facades/System.Reflection.DispatchProxy/Makefile index 3c949251b97..0d407febc10 100644 --- a/mcs/class/Facades/System.Reflection.DispatchProxy/Makefile +++ b/mcs/class/Facades/System.Reflection.DispatchProxy/Makefile @@ -11,7 +11,7 @@ LIBRARY = System.Reflection.DispatchProxy.dll KEYFILE = ../../msfinal.pub SIGN_FLAGS = /delaysign /nowarn:1616,1699 -LIB_REFS = System +LIB_REFS = System System.Core LIB_MCS_FLAGS = $(SIGN_FLAGS) /unsafe NO_TEST = yes diff --git a/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources b/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources index ef77ad0ee51..6d141ac1745 100644 --- a/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources +++ b/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.dll.sources @@ -1,3 +1,2 @@ -../../../build/common/MonoTODOAttribute.cs AssemblyInfo.cs -System.Reflection/DispatchProxy.cs +TypeForwarders.cs diff --git a/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs b/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs deleted file mode 100644 index 540e525b425..00000000000 --- a/mcs/class/Facades/System.Reflection.DispatchProxy/System.Reflection/DispatchProxy.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// DispatchProxy.cs -// -// Author: -// Alexander Köplinger (alexander.koeplinger@xamarin.com) -// -// (C) 2016 Xamarin, Inc. -// - -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -namespace System.Reflection -{ - public abstract class DispatchProxy - { - [MonoTODO] - protected DispatchProxy() - { - throw new NotImplementedException (); - } - - [MonoTODO] - public static T Create<T, TProxy> () where TProxy : DispatchProxy - { - throw new NotImplementedException (); - } - - [MonoTODO] - protected abstract object Invoke (MethodInfo targetMethod, object[] args); - } -} diff --git a/mcs/class/Facades/System.Reflection.DispatchProxy/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.DispatchProxy/TypeForwarders.cs new file mode 100644 index 00000000000..088e351618d --- /dev/null +++ b/mcs/class/Facades/System.Reflection.DispatchProxy/TypeForwarders.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) 2019 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.DispatchProxy))] diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/Facades_System.Reflection.TypeExtensions.csproj b/mcs/class/Facades/System.Reflection.TypeExtensions/Facades_System.Reflection.TypeExtensions.csproj index 2c7a1f32c35..ca2c59c3bd9 100644 --- a/mcs/class/Facades/System.Reflection.TypeExtensions/Facades_System.Reflection.TypeExtensions.csproj +++ b/mcs/class/Facades/System.Reflection.TypeExtensions/Facades_System.Reflection.TypeExtensions.csproj @@ -102,11 +102,8 @@ <!-- @BUILT_SOURCES@ --> <!--Common files--> <ItemGroup> - <Compile Include="..\..\..\..\external\corefx\src\System.Reflection.TypeExtensions\src\System\Reflection\Requires.cs" /> - <Compile Include="..\..\..\..\external\corefx\src\System.Reflection.TypeExtensions\src\System\Reflection\TypeExtensions.cs" /> <Compile Include="AssemblyInfo.cs" /> <Compile Include="TypeForwarders.cs" /> - <Compile Include="corefx\SR.cs" /> </ItemGroup> <!--End of common files--> <!-- @ALL_SOURCES@ --> diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.dll.sources b/mcs/class/Facades/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.dll.sources index 5b412c4de39..719628dc7c6 100644 --- a/mcs/class/Facades/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.dll.sources +++ b/mcs/class/Facades/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.dll.sources @@ -1,6 +1,2 @@ TypeForwarders.cs AssemblyInfo.cs - -corefx/SR.cs -../../../../external/corefx/src/System.Reflection.TypeExtensions/src/System/Reflection/Requires.cs -../../../../external/corefx/src/System.Reflection.TypeExtensions/src/System/Reflection/TypeExtensions.cs diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/TypeForwarders.cs index 757cd130355..561595b170e 100644 --- a/mcs/class/Facades/System.Reflection.TypeExtensions/TypeForwarders.cs +++ b/mcs/class/Facades/System.Reflection.TypeExtensions/TypeForwarders.cs @@ -20,5 +20,11 @@ // THE SOFTWARE. // +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyExtensions))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.BindingFlags))] - +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventInfoExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberInfoExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodInfoExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ModuleExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.PropertyInfoExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeExtensions))] diff --git a/mcs/class/Facades/System.Reflection.TypeExtensions/corefx/SR.cs b/mcs/class/Facades/System.Reflection.TypeExtensions/corefx/SR.cs deleted file mode 100644 index 8bdd2cb8046..00000000000 --- a/mcs/class/Facades/System.Reflection.TypeExtensions/corefx/SR.cs +++ /dev/null @@ -1,8 +0,0 @@ -// -// This file was generated by resx2sr tool -// - -partial class SR -{ - public const string NoMetadataTokenAvailable = "There is no metadata token available for the given member."; -} |