AddTranslation() public méthode

public AddTranslation ( ClassDescriptor entry ) : void
entry ClassDescriptor
Résultat void
        public SimplTypesScope GetSubtractedSubset(string newName, Type superClassCriterion)
        {
            SimplTypesScope result = Lookup(newName);

            if (result == null)
            {
                result = Lookup(newName);
                if (result == null)
                {
                    result = new SimplTypesScope(newName);
                    AddTranslationScope(newName);
                    foreach (ClassDescriptor classDescriptor in EntriesByClassName.Values)
                    {
                        Type thatClass = classDescriptor.DescribedClass;
                        if (!superClassCriterion.GetTypeInfo().IsAssignableFrom(thatClass.GetTypeInfo()))
                        {
                            result.AddTranslation(thatClass);
                        }
                    }
                }
            }
            return(result);
        }
 public SimplTypesScope GetSubtractedSubset(string newName, Type superClassCriterion)
 {
     SimplTypesScope result = Lookup(newName);
     if (result == null)
     {
         result = Lookup(newName);
         if (result == null)
         {
             result = new SimplTypesScope(newName);
             AddTranslationScope(newName);
             foreach (ClassDescriptor classDescriptor in EntriesByClassName.Values)
             {
                 Type thatClass = classDescriptor.DescribedClass;
                 if (!superClassCriterion.GetTypeInfo().IsAssignableFrom(thatClass.GetTypeInfo()))
                     result.AddTranslation(thatClass);
             }
         }
     }
     return result;
 }
        MetadataClassDescriptor GetMetadataClassDescriptor(SimplTypesScope metadataTScope)
        {
            MetadataClassDescriptor metadataCd = this.metadataClassDescriptor;
            if (metadataCd == null)
            {
                //this.InheritMetaMetadata(null); //edit

                String metadataClassSimpleName = this.GetMetadataClassSimpleName();
                // first look up by simple name, since package names for some built-ins are wrong

                metadataCd =
                    (MetadataClassDescriptor)metadataTScope.GetClassDescriptorBySimpleName(metadataClassSimpleName);
                if (metadataCd == null)
                {
                    String metadataClassName = this.GetMetadataClassName();

                    metadataCd = (MetadataClassDescriptor)metadataTScope.GetClassDescriptorByClassName(metadataClassName);
                    if (metadataCd == null)
                    {
                        try
                        {
                            Type metadataType = Type.GetType(metadataClassName) ??
                                                Type.GetType(metadataClassName +
                                                             AsemblyQualifiedNameForGeneratedSemantics);
                            this.metadataClass = metadataType;
                            if (MetadataClass != null)
                            {
                                metadataCd = (MetadataClassDescriptor)ClassDescriptor.GetClassDescriptor(MetadataClass);
                                metadataTScope.AddTranslation(MetadataClass);
                            }
                            else
                            {
                                Debug.WriteLine("Cannot find metadata class " + metadataClassName + " for " + this);
                            }

                        }
                        catch (Exception e)
                        {
                            Debug.WriteLine("Exception: " + e.Message);
                            Debug.WriteLine("Stacktrace:\n" + e.StackTrace);
                            Debug.WriteLine("Cannot find metadata class " + metadataClassName + " for " + this);
                        }
                    }
                }
            }
            return metadataCd;
        }