예제 #1
0
        /// <inheritdoc/>
        internal override TypeData GetEquivalentNewType(AssemblyFamily newAssemblyFamily)
        {
            var newGenericTypeDefinition = (TypeDefinitionData)GenericTypeDefinition.GetEquivalentNewType(newAssemblyFamily);

            if (newGenericTypeDefinition == null)
            {
                return(null);
            }

            var newGenericArguments = new TypeData[GenericArguments.Count];

            for (int i = 0; i < GenericArguments.Count; i++)
            {
                var newGenericArgument = GenericArguments[i].GetEquivalentNewType(newAssemblyFamily);
                if (newGenericArgument == null)
                {
                    return(null);
                }

                newGenericArguments[i] = newGenericArgument;
            }

            return(newGenericTypeDefinition.GetConstructedGenericTypeData(newGenericArguments));
        }