diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
commit | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch) | |
tree | e5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs | |
parent | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff) | |
download | coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2 coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip |
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs')
-rw-r--r-- | src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs index 693e2d3660..7909562baa 100644 --- a/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs +++ b/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs @@ -25,13 +25,12 @@ namespace System.Reflection.Emit { public class ParameterBuilder : _ParameterBuilder { // set ParamMarshal - [System.Security.SecuritySafeCritical] // auto-generated [Obsolete("An alternate API is available: Emit the MarshalAs custom attribute instead. http://go.microsoft.com/fwlink/?linkid=14202")] public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal) { if (unmanagedMarshal == null) { - throw new ArgumentNullException("unmanagedMarshal"); + throw new ArgumentNullException(nameof(unmanagedMarshal)); } Contract.EndContractBlock(); @@ -44,7 +43,6 @@ namespace System.Reflection.Emit { } // Set the default value of the parameter - [System.Security.SecuritySafeCritical] // auto-generated public virtual void SetConstant(Object defaultValue) { TypeBuilder.SetConstantValue( @@ -56,14 +54,13 @@ namespace System.Reflection.Emit { // Use this function if client decides to form the custom attribute blob themselves - [System.Security.SecuritySafeCritical] [System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) - throw new ArgumentNullException("con"); + throw new ArgumentNullException(nameof(con)); if (binaryAttribute == null) - throw new ArgumentNullException("binaryAttribute"); + throw new ArgumentNullException(nameof(binaryAttribute)); Contract.EndContractBlock(); TypeBuilder.DefineCustomAttribute( @@ -75,12 +72,11 @@ namespace System.Reflection.Emit { } // Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder - [System.Security.SecuritySafeCritical] // auto-generated public void SetCustomAttribute(CustomAttributeBuilder customBuilder) { if (customBuilder == null) { - throw new ArgumentNullException("customBuilder"); + throw new ArgumentNullException(nameof(customBuilder)); } Contract.EndContractBlock(); customBuilder.CreateCustomAttribute((ModuleBuilder) (m_methodBuilder .GetModule()), m_pdToken.Token); @@ -92,7 +88,6 @@ namespace System.Reflection.Emit { private ParameterBuilder() {} - [System.Security.SecurityCritical] // auto-generated internal ParameterBuilder( MethodBuilder methodBuilder, int sequence, @@ -117,28 +112,6 @@ namespace System.Reflection.Emit { return m_pdToken; } -#if !FEATURE_CORECLR - void _ParameterBuilder.GetTypeInfoCount(out uint pcTInfo) - { - throw new NotImplementedException(); - } - - void _ParameterBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) - { - throw new NotImplementedException(); - } - - void _ParameterBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) - { - throw new NotImplementedException(); - } - - void _ParameterBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) - { - throw new NotImplementedException(); - } -#endif - internal int MetadataTokenInternal { get { return m_pdToken.Token; } } public virtual String Name { |