Beispiel #1
0
        public void CopyTo(MethodReturnType copy)
        {
            copy._type = _type;

            if (MarshalType != null)
            {
                MarshalType.CopyTo(copy.CreateMarshalType(MarshalType.UnmanagedType));
            }

            CustomAttributes.CopyTo(copy.CustomAttributes);
        }
        public virtual void Visit(MethodReturnType returnType)
        {
            Visit(returnType.Type);

            if (returnType.MarshalType != null)
            {
                Visit(returnType.MarshalType);
            }

            Visit(returnType.CustomAttributes);
        }
Beispiel #3
0
        public virtual void Build(MethodReturnType returnType)
        {
            var type = returnType.Type;

            if (Build(ref type))
            {
                returnType.Type = type;
            }

            if (returnType.MarshalType != null)
            {
                Build(returnType.MarshalType);
            }

            Build(returnType.CustomAttributes);
        }
        protected void LoadSignature(IBinaryAccessor accessor, ModuleImage image)
        {
            _sigType = accessor.ReadByte();

            if ((_sigType & Metadata.SignatureType.Generic) == Metadata.SignatureType.Generic)
            {
                accessor.ReadCompressedInteger();                 // GenericParameterCount (unused)
            }
            int paramCount = accessor.ReadCompressedInteger();

            int[] rids;
            image.GetParamsByMethod(_rid, out rids);

            int ridIndex = 0;

            _returnType = new MethodReturnType(this);
            _returnType.Load(accessor, rids, ref ridIndex);

            if (paramCount > 0)
            {
                _parameters = new MethodParameterCollection(this);
                _parameters.Load(accessor, paramCount, rids, ridIndex);
            }
        }