private void ConfigureSigner(ISigner signer, string basePath)
        {
            signer.Init();
            var signerPath = Path.Combine(basePath, _configuration.RegistrationFilename);

            if (File.Exists(signerPath))
            {
                _logger.Information("Loading signer from file {signerPath}", signerPath);
                using (var signerStream = File.OpenRead(signerPath))
                    signer.Load(signerStream);
            }
            else
            {
                _logger.Information("Saving signer to {signerPath}", signerPath);
                using (var signerStream = File.OpenWrite(signerPath))
                    signer.Save(signerStream);
            }
        }
示例#2
0
 private static void SaveSignerToFile(ISigner signer, string signerPath)
 {
     _log.Debug("Saving signer");
     using (var signerStream = File.OpenWrite(signerPath))
         signer.Save(signerStream);
 }
示例#3
0
 private static void SaveSignerToFile(ISigner signer, string signerPath)
 {
     Log.Information("Saving Signer");
     using (var signerStream = File.OpenWrite(signerPath))
         signer.Save(signerStream);
 }