internal override ComposablePartDefinition GetGenericPartDefinition()
        {
            GenericSpecializationPartCreationInfo genericCreationInfo = _creationInfo as GenericSpecializationPartCreationInfo;

            if (genericCreationInfo != null)
            {
                return(genericCreationInfo.OriginalPart);
            }

            return(null);
        }
        public override bool Equals(object obj)
        {
            GenericSpecializationPartCreationInfo that = obj as GenericSpecializationPartCreationInfo;

            if (that == null)
            {
                return(false);
            }

            return((_originalPartCreationInfo.Equals(that._originalPartCreationInfo)) &&
                   (_specialization.IsArrayEqual(that._specialization)));
        }
        internal bool TryMakeGenericPartDefinition(Type[] genericTypeParameters, out ComposablePartDefinition genericPartDefinition)
        {
            genericPartDefinition = null;

            if (!GenericSpecializationPartCreationInfo.CanSpecialize(Metadata, genericTypeParameters))
            {
                return(false);
            }

            genericPartDefinition = new ReflectionComposablePartDefinition(new GenericSpecializationPartCreationInfo(_creationInfo, this, genericTypeParameters));
            return(true);
        }