Skip to content

Commit

Permalink
[2018-02] [Facades] Add System.Memory facade to mobile profiles (#7967)
Browse files Browse the repository at this point in the history
* [Facades] Add System.Memory facade to mobile profiles

Contains only the types we have right now.

Fixes #7610

* Bump API snapshot submodule
  • Loading branch information
monojenkins authored and akoeplinger committed Apr 3, 2018
1 parent dea448a commit 95cc49a
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 2 deletions.
2 changes: 1 addition & 1 deletion external/api-snapshot
35 changes: 35 additions & 0 deletions mcs/class/Facades/System.Memory/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Copyright (c) 2018 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.
//

using System;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: AssemblyTitle ("System.Memory")]
[assembly: AssemblyDescription ("System.Memory")]
[assembly: AssemblyDefaultAlias ("System.Memory")]
[assembly: AssemblyCompany ("Mono development team")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
24 changes: 24 additions & 0 deletions mcs/class/Facades/System.Memory/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MCS_BUILD_DIR = ../../../build

thisdir = class/Facades/System.Memory
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make

LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades

LIBRARY = System.Memory.dll

KEYFILE = ../../Open.snk
LIBRARY_SNK = $(KEYFILE)
SIGN_FLAGS = /delaysign /nowarn:1616,1699
LIB_REFS =
LIB_MCS_FLAGS = $(SIGN_FLAGS)

PLATFORM_DEBUG_FLAGS =

NO_TEST = yes

include $(MCS_BUILD_DIR)/library.make


3 changes: 3 additions & 0 deletions mcs/class/Facades/System.Memory/System.Memory.dll.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TypeForwarders.cs
AssemblyInfo.cs

47 changes: 47 additions & 0 deletions mcs/class/Facades/System.Memory/TypeForwarders.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// Copyright (c) 2018 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.TypeForwardedTo(typeof(System.MemoryExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Memory<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlyMemory<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlySpan<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Span<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.OperationStatus))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.MemoryMarshal))]

// TODO: we don't have these types yet
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SequencePosition))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.BuffersExtensions))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IBufferWriter<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IMemoryOwner<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IPinnable))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryManager<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryPool<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Base64))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Formatter))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Parser))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SequenceMarshal))]
2 changes: 1 addition & 1 deletion mcs/class/Facades/subdirs.make
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ wasm_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_on
wasm_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)

mobile_only_SUBDIRS = System.Security.Cryptography.Pkcs \
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy System.Memory

mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.OpenSsl

Expand Down

0 comments on commit 95cc49a

Please sign in to comment.