/// <summary> /// Creates a new instance of a Microfocus vision file /// </summary> /// <param name="fileDefinition">Definition of the file</param> /// <param name="filePath">File path</param> /// <param name="visionLibrary">Library for manage vision file</param> internal MicrofocusVisionFile(VisionFileDefinition fileDefinition, string filePath, IMicrofocusVisionLibrary visionLibrary) { FileDefinition = fileDefinition ?? throw new ArgumentNullException(nameof(fileDefinition)); FilePath = filePath ?? throw new ArgumentNullException(nameof(filePath)); VisionLibrary = visionLibrary ?? throw new ArgumentNullException(nameof(visionLibrary)); DataConverter = new MicrofocusDataConverter(FileDefinition); }
/// <summary> /// Creates a new instance of Microfocus Vision record /// </summary> /// <param name="fileDefinition">Definition of the file</param> /// <param name="dataConverter">Data converter between byte array (raw data) and .NET types</param> internal MicrofocusVisionRecord(VisionFileDefinition fileDefinition, MicrofocusDataConverter dataConverter) { FileDefinition = fileDefinition ?? throw new ArgumentNullException(nameof(fileDefinition)); DataConverter = dataConverter ?? throw new ArgumentNullException(nameof(dataConverter)); RawContent = DataConverter.GetEmptyRecordContent(); }