diff options
author | Rodrigo Kumpera <kumpera@gmail.com> | 2010-01-19 19:52:51 +0300 |
---|---|---|
committer | Rodrigo Kumpera <kumpera@gmail.com> | 2010-01-19 19:52:51 +0300 |
commit | 5f6e5d08060d2ee772db42068b6fb19157dc11af (patch) | |
tree | f89d5404aaa371d3dffc655a9d4dcb0b1f31b236 /mcs | |
parent | 09c48682c5d4b7a9310c226666630112b354f48a (diff) |
2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
* EventOnTypeBuilderInst.cs: Fix build.
svn path=/trunk/mcs/; revision=149828
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System.Reflection.Emit/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/corlib/System.Reflection.Emit/EventOnTypeBuilderInst.cs | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.Reflection.Emit/ChangeLog b/mcs/class/corlib/System.Reflection.Emit/ChangeLog index fd9153434f4..c1f4f32fe6b 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ChangeLog +++ b/mcs/class/corlib/System.Reflection.Emit/ChangeLog @@ -1,3 +1,7 @@ +2010-01-19 Rodrigo Kumpera <rkumpera@novell.com> + + * EventOnTypeBuilderInst.cs: Fix build. + 2010-01-03 Zoltan Varga <vargaz@gmail.com> * ILGenerator.cs (Emit): Disallow byref types. Fixes #564411. diff --git a/mcs/class/corlib/System.Reflection.Emit/EventOnTypeBuilderInst.cs b/mcs/class/corlib/System.Reflection.Emit/EventOnTypeBuilderInst.cs index be4fb949146..2dcc00317ce 100644 --- a/mcs/class/corlib/System.Reflection.Emit/EventOnTypeBuilderInst.cs +++ b/mcs/class/corlib/System.Reflection.Emit/EventOnTypeBuilderInst.cs @@ -113,16 +113,28 @@ namespace System.Reflection.Emit public override bool IsDefined (Type attributeType, bool inherit) { + if (!instantiation.IsCompilerContext) + throw new NotSupportedException (); + if (event_info != null) + return event_info.IsDefined (attributeType, inherit); throw new NotSupportedException (); } public override object [] GetCustomAttributes (bool inherit) { + if (!instantiation.IsCompilerContext) + throw new NotSupportedException (); + if (event_info != null) + return event_info.GetCustomAttributes (inherit); throw new NotSupportedException (); } public override object [] GetCustomAttributes (Type attributeType, bool inherit) { + if (!instantiation.IsCompilerContext) + throw new NotSupportedException (); + if (event_info != null) + return event_info.GetCustomAttributes (attributeType, inherit); throw new NotSupportedException (); } } |