Exemplo n.º 1
0
 /// <summary>
 /// Translates a general-case declared type.
 /// </summary>
 /// <param name="declaredType">The <see cref="IDeclaredType"/> to translate.</param>
 public virtual void TranslateType(IDeclaredType declaredType)
 {
     if (declaredType is IClassType)
     {
         this.TranslateType((IClassType)declaredType);
     }
     else if (declaredType is IEnumeratorType)
     {
         this.TranslateType((IEnumeratorType)declaredType);
     }
     else if (declaredType is IDelegateType)
     {
         this.TranslateType((IDelegateType)declaredType);
     }
     else if (declaredType is IInterfaceType)
     {
         this.TranslateType((IInterfaceType)declaredType);
     }
     else if (declaredType is IStructType)
     {
         this.TranslateType((IStructType)declaredType);
     }
     else
     {
         throw new NotSupportedException(string.Format("Type {0} not supported", declaredType.GetType().Name));
     }
 }