public DataContextProvider(IPathProvider pathProvider, CultureSettings cultureSettings) { if (pathProvider == null) throw new ArgumentNullException("pathProvider"); if (cultureSettings == null) throw new ArgumentNullException("cultureSettings"); this.pathProvider = pathProvider; this.cultureSettings = cultureSettings; }
public YnabGateway(IFileAccess fileAccess, IPathProvider pathProvider, CultureSettings cultureSettings) { if (fileAccess == null) throw new ArgumentNullException("fileAccess"); if (pathProvider == null) throw new ArgumentNullException("pathProvider"); if (cultureSettings == null) throw new ArgumentNullException("cultureSettings"); this.fileAccess = fileAccess; this.pathProvider = pathProvider; this.cultureSettings = cultureSettings; }
internal string ToYnabString(CultureSettings cultureSettings) { var result = string.Format( cultureSettings.CultureInfo, "{1}{0}{2}{0}{3}{0}{4}{0}{5}{0}{6}", new object[] { cultureSettings.Separator, this.ValueDate.ToString(cultureSettings.DateTimeFormatString, cultureSettings.CultureInfo), "Import Statements", ReplaceSeparator(this.Payee, cultureSettings), ReplaceSeparator(this.Description, cultureSettings), this.AmountOut.ToString("0.00", CultureInfo.InvariantCulture), this.AmountIn.ToString("0.00", CultureInfo.InvariantCulture) }); return(result); }
internal string ToYnabString(CultureSettings cultureSettings) { var result = string.Format( cultureSettings.CultureInfo, "{1}{0}{2}{0}{3}{0}{4}{0}{5}{0}{6}", new object[] { cultureSettings.Separator, this.ValueDate.ToString(cultureSettings.DateTimeFormatString, cultureSettings.CultureInfo), "Import Statements", ReplaceSeparator(this.Payee, cultureSettings), ReplaceSeparator(this.Description, cultureSettings), this.AmountOut.ToString("0.00", CultureInfo.InvariantCulture), this.AmountIn.ToString("0.00", CultureInfo.InvariantCulture) }); return result; }
public YnabGateway(IFileAccess fileAccess, IPathProvider pathProvider, CultureSettings cultureSettings) { if (fileAccess == null) { throw new ArgumentNullException("fileAccess"); } if (pathProvider == null) { throw new ArgumentNullException("pathProvider"); } if (cultureSettings == null) { throw new ArgumentNullException("cultureSettings"); } this.fileAccess = fileAccess; this.pathProvider = pathProvider; this.cultureSettings = cultureSettings; }
internal IEnumerable <string> ToYnabStrings(CultureSettings cultureSettings) { return(new[] { GetHeaderLine(cultureSettings) }.Concat(this.ynabEntries.Select(entry => entry.ToYnabString(cultureSettings)))); }
private string GetHeaderLine(CultureSettings cultureSettings) { var result = string.Format(cultureSettings.CultureInfo, "Date{0}Category{0}Payee{0}Memo{0}Outflow{0}Inflow", new object[] { cultureSettings.Separator }); return(result); }
private string ReplaceSeparator(string s, CultureSettings cultureSettings) { return(s.Replace(cultureSettings.Separator, cultureSettings.ReplacementForSeparator)); }
private string GetHeaderLine(CultureSettings cultureSettings) { var result = string.Format(cultureSettings.CultureInfo, "Date{0}Category{0}Payee{0}Memo{0}Outflow{0}Inflow", new object[] { cultureSettings.Separator }); return result; }
internal IEnumerable<string> ToYnabStrings(CultureSettings cultureSettings) { return new[] { GetHeaderLine(cultureSettings) }.Concat(this.ynabEntries.Select(entry => entry.ToYnabString(cultureSettings))); }
private string ReplaceSeparator(string s, CultureSettings cultureSettings) { return s.Replace(cultureSettings.Separator, cultureSettings.ReplacementForSeparator); }