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); }
public CoreService( IClassObtainer classObtainer, IFileWriter fileWriter, IUserInputRepository userInputRepo ) => (_classObtainer, _fileWriter, _userInputRepo) =
public ClassInspector(IUserInputRepository userInputRepo) => (_userInputRepo) = (userInputRepo);