internal override byte[] GetSendBuffer()
 {
     byte[] baseSendBuffer = base.GetSendBuffer();
     ArrayBuilder b = new ArrayBuilder(baseSendBuffer.Length + _sendData.Length);
     b.Append(baseSendBuffer);
     b.Append(_sendData);
     return b.GetBytes();
 }
        /// <summary>
        /// Metadata based computation of interfaces.
        /// </summary>
        private DefType[] ComputeRuntimeInterfacesForNonInstantiatedMetadataType(MetadataType type)
        {
            DefType[] explicitInterfaces = type.ExplicitlyImplementedInterfaces;
            DefType[] baseTypeInterfaces = (type.BaseType != null) ? (type.BaseType.RuntimeInterfaces) : Array.Empty<DefType>();

            // Optimized case for no interfaces newly defined.
            if (explicitInterfaces.Length == 0)
                return baseTypeInterfaces;

            ArrayBuilder<DefType> interfacesArray = new ArrayBuilder<DefType>();
            interfacesArray.Append(baseTypeInterfaces);

            foreach (DefType iface in explicitInterfaces)
            {
                BuildPostOrderInterfaceList(iface, ref interfacesArray);
            }

            return interfacesArray.ToArray();
        }
Example #3
0
 internal virtual byte[] GetSendBuffer()
 {
     ArrayBuilder b = new ArrayBuilder(4);
     b.Append(_cla);
     b.Append(_ins);
     b.Append(_p1);
     b.Append(_p2);
     return b.GetBytes();
 }