Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2018-08-09 06:08:38 +0300
committerAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2018-08-09 07:05:03 +0300
commit7902bed42a15edd4e6d385ed57ef27d43a63a640 (patch)
treef118f3db841076a137b5ab00b998693a0937920b /src
parente76ee238ad4ad320887ce710ede0f26093d4a05c (diff)
Move methodbody and exceptionHandlingClause to shared (#19364)
* Changing names and making runtime files * Movel methodbody and exceptionHandlingClause to shared * Fixing build error Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems2
-rw-r--r--src/System.Private.CoreLib/shared/System/Reflection/ExceptionHandlingClause.cs28
-rw-r--r--src/System.Private.CoreLib/shared/System/Reflection/MethodBody.cs20
3 files changed, 50 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
index afb7c6b3c..db2fffb6f 100644
--- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
+++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
@@ -338,6 +338,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\Emit\StackBehaviour.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\EventAttributes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\EventInfo.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\ExceptionHandlingClause.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\ExceptionHandlingClauseOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\FieldAttributes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\FieldInfo.cs" />
@@ -356,6 +357,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MemberTypes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodAttributes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodBase.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodBody.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodImplAttributes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodInfo.Internal.cs" />
diff --git a/src/System.Private.CoreLib/shared/System/Reflection/ExceptionHandlingClause.cs b/src/System.Private.CoreLib/shared/System/Reflection/ExceptionHandlingClause.cs
new file mode 100644
index 000000000..15780f11c
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Reflection/ExceptionHandlingClause.cs
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Globalization;
+
+namespace System.Reflection
+{
+ public class ExceptionHandlingClause
+ {
+ protected ExceptionHandlingClause() { }
+ public virtual ExceptionHandlingClauseOptions Flags => default;
+ public virtual int TryOffset => 0;
+ public virtual int TryLength => 0;
+ public virtual int HandlerOffset => 0;
+ public virtual int HandlerLength => 0;
+ public virtual int FilterOffset => throw new InvalidOperationException(SR.Arg_EHClauseNotFilter);
+ public virtual Type CatchType => null;
+
+ public override string ToString()
+ {
+ return string.Format(CultureInfo.CurrentUICulture,
+ "Flags={0}, TryOffset={1}, TryLength={2}, HandlerOffset={3}, HandlerLength={4}, CatchType={5}",
+ Flags, TryOffset, TryLength, HandlerOffset, HandlerLength, CatchType);
+ }
+ }
+}
+
diff --git a/src/System.Private.CoreLib/shared/System/Reflection/MethodBody.cs b/src/System.Private.CoreLib/shared/System/Reflection/MethodBody.cs
new file mode 100644
index 000000000..bdf53ad12
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Reflection/MethodBody.cs
@@ -0,0 +1,20 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.Generic;
+
+namespace System.Reflection
+{
+ public class MethodBody
+ {
+ protected MethodBody() { }
+ public virtual int LocalSignatureMetadataToken => 0;
+ public virtual IList<LocalVariableInfo> LocalVariables => throw new ArgumentNullException("array");
+ public virtual int MaxStackSize => 0;
+ public virtual bool InitLocals => false;
+ public virtual byte[] GetILAsByteArray() => null;
+ public virtual IList<ExceptionHandlingClause> ExceptionHandlingClauses => throw new ArgumentNullException("array");
+ }
+}
+