public IntrospectiveMethodInfo
        (
            [NotNull] MethodBuilder builder,
            [NotNull] Type returnType,
            [NotNull, ItemNotNull] IEnumerable <Type> parameterTypes,
            [CanBeNull] IntrospectiveMethodInfo definitionToCopyAttributesFrom = null)
            : base(builder, definitionToCopyAttributesFrom?.CustomAttributes ?? new List <CustomAttributeData>())
        {
            ReturnType     = returnType;
            ParameterTypes = parameterTypes.ToList();

            // TODO: Pass in or determine if they are available
            IsSpecialName = builder.IsSpecialName;
            IsAbstract    = builder.IsAbstract;

            if (!(definitionToCopyAttributesFrom is null))
            {
                // Copy attributes
                Attributes = definitionToCopyAttributesFrom.Attributes;

                ParameterNames            = definitionToCopyAttributesFrom.ParameterNames;
                ParameterAttributes       = definitionToCopyAttributesFrom.ParameterAttributes;
                ParameterCustomAttributes = definitionToCopyAttributesFrom.ParameterCustomAttributes;

                ReturnParameterAttributes       = definitionToCopyAttributesFrom.ReturnParameterAttributes;
                ReturnParameterCustomAttributes = definitionToCopyAttributesFrom.ReturnParameterCustomAttributes;
            }
        }
        /// <summary>
        /// Determines whether or not the current instance has the same signature as another.
        /// </summary>
        /// <param name="other">The other method info.</param>
        /// <returns>true if the signatures are the same; otherwise, false.</returns>
        public bool HasSameSignatureAs([NotNull] IntrospectiveMethodInfo other)
        {
            if (Name != other.Name)
            {
                return(false);
            }

            if (ReturnType != other.ReturnType)
            {
                return(false);
            }

            if (ParameterTypes.Count != other.ParameterTypes.Count)
            {
                return(false);
            }

            if (!ParameterTypes.SequenceEqual(other.ParameterTypes))
            {
                return(false);
            }

            return(true);
        }
 public bool HasSameNativeEntrypointAs([NotNull] IntrospectiveMethodInfo other)
 {
     return(GetFullNativeEntrypoint() == other.GetFullNativeEntrypoint());
 }