Exemplo n.º 1
0
        private async Task writeRegisterToDiskAsync()
        {
            _trace.TraceEvent(TraceEventType.Verbose, 0, "EveLibFileCache:Writing cache register to disk");
            var lockTask = await _registerLock.WriterLockAsync();

            try {
                await AsyncFileUtilities.WriteAllLinesAsync(CacheRegister,
                                                            _register.Select(x => x.Key + "," + x.Value.ToString(CultureInfo.InvariantCulture)))
                .ConfigureAwait(false);
            }
            finally {
                lockTask.Dispose();
            }
        }
Exemplo n.º 2
0
 private Task writeRegisterToDiskAsync()
 {
     _trace.TraceEvent(TraceEventType.Verbose, 0, "EveLibFileCache:Writing cache register to disk");
     return(AsyncFileUtilities.WriteAllLinesAsync(CacheRegister,
                                                  _register.Select(x => x.Key + "," + x.Value.ToString(CultureInfo.InvariantCulture))));
 }