Пример #1
0
 public static ClassInfo GetUserInfo(
     ClassInfo info,
     IUserInputRepository repo
     )
 {
     foreach (var property in info.Properties)
     {
         var type = property.ValidType;
         if (type == ValidType.String)
         {
             property.Length = repo.GetUserInput(
                 GetLengthMessage(property.CSharpName)
                 );
         }
         else if (type == ValidType.Decimal || type == ValidType.Double)
         {
             property.Precision = ParseUserInput(repo.GetUserInput(
                                                     GetPrecisionMessage(property.CSharpName)
                                                     ));
             property.Scale = ParseUserInput(repo.GetUserInput(
                                                 GetScaleMessage(property.CSharpName)
                                                 ));
         }
     }
     return(info);
 }
Пример #2
0
 public CoreService(
     IClassObtainer classObtainer,
     IFileWriter fileWriter,
     IUserInputRepository userInputRepo
     ) => (_classObtainer, _fileWriter, _userInputRepo) =
Пример #3
0
 public ClassInspector(IUserInputRepository userInputRepo) =>
 (_userInputRepo) = (userInputRepo);