コード例 #1
0
 public IActionResult Get(
     [FromServices] ExtractContext context,
     [FromServices] SyndicationContext syndicationContext,
     CancellationToken cancellationToken = default) =>
 new ExtractArchive($"{ZipName}-{DateTime.Now:yyyy-MM-dd}")
 {
     StreetNameRegistryExtractBuilder.CreateStreetNameFile(context, syndicationContext)
 }
 .CreateFileCallbackResult(cancellationToken);
コード例 #2
0
 public IActionResult Get(
     [FromServices] ExtractContext context,
     [FromServices] UseExtractV2Toggle useExtractV2Toggle,
     [FromServices] SyndicationContext syndicationContext,
     CancellationToken cancellationToken = default)
 {
     if (useExtractV2Toggle.FeatureEnabled)
     {
         return(new IsolationExtractArchive($"{ZipName}-{DateTime.Now:yyyy-MM-dd}", context)
         {
             StreetNameRegistryExtractBuilder.CreateStreetNameFilesV2(context, syndicationContext)
         }
                .CreateFileCallbackResult(cancellationToken));
     }
     return(new IsolationExtractArchive($"{ZipName}-{DateTime.Now:yyyy-MM-dd}", context)
     {
         StreetNameRegistryExtractBuilder.CreateStreetNameFiles(context, syndicationContext)
     }
            .CreateFileCallbackResult(cancellationToken));
 }