DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/WellOperationImport/WellOperationImportTemplateService.cs

21 lines
581 B
C#
Raw Normal View History

using System.IO;
using System.Linq;
using System.Reflection;
using AsbCloudApp.Services.WellOperationImport;
namespace AsbCloudInfrastructure.Services.WellOperationImport;
public class WellOperationImportTemplateService : IWellOperationImportTemplateService
{
public Stream GetExcelTemplateStream()
{
var resourceName = Assembly.GetExecutingAssembly()
.GetManifestResourceNames()
.FirstOrDefault(n => n.EndsWith("WellOperationImportTemplate.xlsx"))!;
var stream = Assembly.GetExecutingAssembly()
.GetManifestResourceStream(resourceName)!;
return stream;
}
}