public IEnumerable <LocalizableTextInfo> Extract(string content, CancellationToken cancellationToken = default) { ResXFileReader resourceReader; using (var reader = new StringReader(content)) resourceReader = new ResXFileReader(reader); return(resourceReader.Select(kvp => new LocalizableTextInfo { Id = kvp.Value, Comment = kvp.Key })); }
public MainWindow() { var windowThrottleInterval = TimeSpan.FromSeconds(1); _windowLocationSaveMethod = new MethodThrottle(SaveWindowLocation, windowThrottleInterval); _windowSizeSaveMethod = new MethodThrottle <Size>(SaveWindowSize, windowThrottleInterval); _windowStateSaveMethod = new MethodThrottle(SaveWindowState, windowThrottleInterval); _documentFileReader = new DocumentFileReader(); _documentFileWriter = new DocumentFileWriter(); _excelFileReader = new ExcelFileReader(); _resXFileReader = new ResXFileReader(); _resXFileWriter = new ResXFileWriter(); InitializeComponent(); SetupInitialWindow(); LoadCommandLineFile(); UpdateTitle(); }