private AppendedResults Transform(ArchivedVisit archivedVisit) { var appender = new FieldDataResultsAppender { Client = Client, LocationCache = LocationCache, LocationAliases = Context.LocationAliases, Log = Log }; var mapper = new ArchivedVisitMapper { Appender = appender, ReferencePointCache = ReferencePointCache, ParameterIdLookup = ParameterIdLookup, MethodLookup = MethodLookup }; var visit = mapper.Map(archivedVisit); return(new AppendedResults { FrameworkAssemblyQualifiedName = typeof(IFieldDataPlugin).AssemblyQualifiedName, PluginAssemblyQualifiedTypeName = mapper.GetJsonPluginAQFN(), AppendedVisits = new List <FieldVisitInfo> { visit } }); }
private void Validate() { if (!Directory.Exists(Context.ExportFolder)) { throw new ExpectedException($"Export folder '{Context.ExportFolder}' does not exist."); } var appender = new FieldDataResultsAppender { Client = Client, LocationCache = LocationCache, LocationAliases = Context.LocationAliases, Log = Log }; Mapper = new ArchivedVisitMapper { Appender = appender, Plugins = Plugins, ReferencePointCache = ReferencePointCache, ParameterIdLookup = ParameterIdLookup, MethodLookup = MethodLookup }; }