Esempio n. 1
0
 public void Visit(TypeName typeName)
 {
     if (SystemTypeMapper.IsSystemType(typeName))
     {
         ReturnSystemMemberType(typeName);
     }
     else
     {
         ReturnNamedMember(typeName);
     }
 }
Esempio n. 2
0
 public void Visit(NullableType nullableType)
 {
     if (SystemTypeMapper.IsSystemType(nullableType.Underlying))
     {
         ReturnSystemMemberType(nullableType);
     }
     else
     {
         var hasResult          = false;
         var underlyingTypeName = GetUnderlyingTypeName(nullableType);
         if (underlyingTypeName != null)
         {
             if (IsKnownValueType(underlyingTypeName))
             {
                 ReturnNullableMember(underlyingTypeName);
                 hasResult = true;
             }
         }
         if (!hasResult)
         {
             throw new NotImplementedException("Nullable Type members not implemented for unknown, non-system types.");
         }
     }
 }
Esempio n. 3
0
 private void ReturnSystemMemberType(ITypeNode node)
 {
     MemberType = MemberType.CreateForSystemType(SystemTypeMapper.SystemTypeFor(node));
 }