Best NBi code snippet using NBi.Core.Transformation.Transformer.Native.IO.FileToCreationDateTimeUtc.EvaluateFileInfo
FileTransformation.cs
Source:FileTransformation.cs
...21 var fullPath = Path.Combine(BasePath, value);22 var fileInfo = new FileInfo(fullPath);23 if (!fileInfo.Exists)24 throw new ExternalDependencyNotFoundException(fullPath);25 return EvaluateFileInfo(fileInfo);26 }27 protected abstract object EvaluateFileInfo(FileInfo value);28 }29 class FileToSize : AbstractFileTransformation30 {31 public FileToSize(string basePath) : base(basePath) { }32 protected override object EvaluateFileInfo(FileInfo value) => value.Length;33 }34 class FileToCreationDateTime : AbstractFileTransformation35 {36 public FileToCreationDateTime(string basePath) : base(basePath) { }37 protected override object EvaluateFileInfo(FileInfo value) => value.CreationTime;38 }39 class FileToCreationDateTimeUtc : AbstractFileTransformation40 {41 public FileToCreationDateTimeUtc(string basePath) : base(basePath) { }42 protected override object EvaluateFileInfo(FileInfo value) => value.CreationTimeUtc;43 }44 class FileToUpdateDateTime : AbstractFileTransformation45 {46 public FileToUpdateDateTime(string basePath) : base(basePath) { }47 protected override object EvaluateFileInfo(FileInfo value) => value.LastWriteTime;48 }49 class FileToUpdateDateTimeUtc : AbstractFileTransformation50 {51 public FileToUpdateDateTimeUtc(string basePath) : base(basePath) { }52 protected override object EvaluateFileInfo(FileInfo value) => value.LastWriteTimeUtc;53 }54}...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!