InternalGetBytes() private method

private InternalGetBytes ( ) : byte[]
return byte[]
 public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
 {
     if (unmanagedMarshal == null)
     {
         throw new ArgumentNullException("unmanagedMarshal");
     }
     byte[] array = unmanagedMarshal.InternalGetBytes();
     TypeBuilder.SetFieldMarshal(this.m_methodBuilder.GetModuleBuilder().GetNativeHandle(), this.m_pdToken.Token, array, array.Length);
 }
 public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
 {
     if (unmanagedMarshal == null)
     {
         throw new ArgumentNullException("unmanagedMarshal");
     }
     byte[] bytes = unmanagedMarshal.InternalGetBytes();
     TypeBuilder.SetFieldMarshal(this.m_methodBuilder.GetModuleBuilder().GetNativeHandle(), this.m_pdToken.Token, bytes, bytes.Length);
 }
 public void SetMarshal(UnmanagedMarshal unmanagedMarshal)
 {
     if (unmanagedMarshal == null)
     {
         throw new ArgumentNullException("unmanagedMarshal");
     }
     this.m_typeBuilder.ThrowIfCreated();
     byte[] array = unmanagedMarshal.InternalGetBytes();
     TypeBuilder.SetFieldMarshal(this.m_typeBuilder.GetModuleBuilder().GetNativeHandle(), this.GetToken().Token, array, array.Length);
 }
Beispiel #4
0
        // set FieldMarshal
        /// <include file='doc\FieldBuilder.uex' path='docs/doc[@for="FieldBuilder.SetMarshal"]/*' />
        public void SetMarshal(UnmanagedMarshal unmanagedMarshal)
        {
            m_typeBuilder.ThrowIfCreated();

            if (unmanagedMarshal == null)
            {
                throw new ArgumentNullException("unmanagedMarshal");
            }
            byte [] ubMarshal = unmanagedMarshal.InternalGetBytes();
            TypeBuilder.InternalSetMarshalInfo(m_typeBuilder.Module, GetToken().Token, ubMarshal, ubMarshal.Length);
        }
Beispiel #5
0
     // set FieldMarshal
     /// <include file='doc\FieldBuilder.uex' path='docs/doc[@for="FieldBuilder.SetMarshal"]/*' />
     public void SetMarshal(UnmanagedMarshal unmanagedMarshal)
     {
         m_typeBuilder.ThrowIfCreated();        
         
         if (unmanagedMarshal == null)
         {
 			throw new ArgumentNullException("unmanagedMarshal");
         }
         byte []        ubMarshal = unmanagedMarshal.InternalGetBytes();
         TypeBuilder.InternalSetMarshalInfo(m_typeBuilder.Module, GetToken().Token, ubMarshal, ubMarshal.Length);
     }
Beispiel #6
0
        public void SetMarshal(UnmanagedMarshal unmanagedMarshal)
        {
            if (unmanagedMarshal == null)
            {
                throw new ArgumentNullException("unmanagedMarshal");
            }
            Contract.EndContractBlock();

            m_typeBuilder.ThrowIfCreated();

            byte[] ubMarshal = unmanagedMarshal.InternalGetBytes();

            TypeBuilder.SetFieldMarshal(m_typeBuilder.GetModuleBuilder().GetNativeHandle(), GetToken().Token, ubMarshal, ubMarshal.Length);
        }
Beispiel #7
0
     // set ParamMarshal
     /// <include file='doc\ParameterBuilder.uex' path='docs/doc[@for="ParameterBuilder.SetMarshal"]/*' />
     public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
     {
         if (unmanagedMarshal == null)
         {
 			throw new ArgumentNullException("unmanagedMarshal");
         }
         
         byte []        ubMarshal = unmanagedMarshal.InternalGetBytes();        
         TypeBuilder.InternalSetMarshalInfo(
             m_methodBuilder.GetModule(),
             m_pdToken.Token, 
             ubMarshal, 
             ubMarshal.Length);
     }
Beispiel #8
0
        // set ParamMarshal
        /// <include file='doc\ParameterBuilder.uex' path='docs/doc[@for="ParameterBuilder.SetMarshal"]/*' />
        public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
        {
            if (unmanagedMarshal == null)
            {
                throw new ArgumentNullException("unmanagedMarshal");
            }

            byte [] ubMarshal = unmanagedMarshal.InternalGetBytes();
            TypeBuilder.InternalSetMarshalInfo(
                m_methodBuilder.GetModule(),
                m_pdToken.Token,
                ubMarshal,
                ubMarshal.Length);
        }
 public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
 {
     if (unmanagedMarshal == null)
     {
         throw new ArgumentNullException("unmanagedMarshal");
     }
     Contract.EndContractBlock();
     
     byte []        ubMarshal = unmanagedMarshal.InternalGetBytes();
     TypeBuilder.SetFieldMarshal(
         m_methodBuilder.GetModuleBuilder().GetNativeHandle(),
         m_pdToken.Token, 
         ubMarshal, 
         ubMarshal.Length);
 }
Beispiel #10
0
        public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
        {
            if (unmanagedMarshal == null)
            {
                throw new ArgumentNullException(nameof(unmanagedMarshal));
            }
            Contract.EndContractBlock();

            byte [] ubMarshal = unmanagedMarshal.InternalGetBytes();
            TypeBuilder.SetFieldMarshal(
                m_methodBuilder.GetModuleBuilder().GetNativeHandle(),
                m_pdToken.Token,
                ubMarshal,
                ubMarshal.Length);
        }
Beispiel #11
0
        public virtual void SetMarshal(UnmanagedMarshal unmanagedMarshal)
        {
            if (unmanagedMarshal == null)
            {
                throw new ArgumentNullException("unmanagedMarshal");
            }
            byte[]        bytes        = unmanagedMarshal.InternalGetBytes();
            RuntimeModule nativeHandle = this.m_methodBuilder.GetModuleBuilder().GetNativeHandle();
            int           token        = this.m_pdToken.Token;

            byte[] ubMarshal = bytes;
            int    length    = ubMarshal.Length;

            TypeBuilder.SetFieldMarshal(nativeHandle, token, ubMarshal, length);
        }
Beispiel #12
0
        public void SetMarshal(UnmanagedMarshal unmanagedMarshal)
        {
            if (unmanagedMarshal == null)
                throw new ArgumentNullException("unmanagedMarshal");
            Contract.EndContractBlock();

            m_typeBuilder.ThrowIfCreated();

            byte[] ubMarshal = unmanagedMarshal.InternalGetBytes();

            TypeBuilder.SetFieldMarshal(m_typeBuilder.GetModuleBuilder().GetNativeHandle(), GetToken().Token, ubMarshal, ubMarshal.Length);
        }
 public void SetMarshal(UnmanagedMarshal unmanagedMarshal)
 {
     if (unmanagedMarshal == null)
     {
         throw new ArgumentNullException("unmanagedMarshal");
     }
     this.m_typeBuilder.ThrowIfCreated();
     byte[] bytes = unmanagedMarshal.InternalGetBytes();
     TypeBuilder.SetFieldMarshal(this.m_typeBuilder.GetModuleBuilder().GetNativeHandle(), this.GetToken().Token, bytes, bytes.Length);
 }