示例#1
0
        protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
        {
            bool needsChange = CanonUtilites.ConversionToCanonFormIsAChange(Context, Instantiation, kind);
            if (needsChange)
            {
                MetadataType openType = (MetadataType)GetTypeDefinition();
                Instantiation newInstantiation = CanonUtilites.ConvertInstantiationToCanonForm(Context, Instantiation, kind);
                return Context.GetInstantiatedType(openType, newInstantiation);
            }

            return this;
        }
示例#2
0
        protected override TypeDesc ConvertToCanonFormImpl(CanonicalFormKind kind)
        {
            bool          needsChange;
            Instantiation canonInstantiation = CanonUtilites.ConvertInstantiationToCanonForm(Instantiation, kind, out needsChange);

            if (needsChange)
            {
                MetadataType openType = (MetadataType)GetTypeDefinition();
                return(Context.GetInstantiatedType(openType, canonInstantiation));
            }

            return(this);
        }