public GhgManager(byte[] ghgData, string filePath) { //validate it if (ghgData != null) { if (ghgData.Length > 0) { //attempt to load the GHG modeling format var ghgModel = GhgFile.FromRawBytes(ghgData, filePath); //validate it if (ghgModel != null) { ComplexModel = ghgModel; } } } }
public GhgManager(string filePath) { if (File.Exists(filePath)) { //read in the entire GHG file var fileData = File.ReadAllBytes(filePath); //validate it if (fileData.Length > 0) { //attempt to load the GHG modeling format var ghgModel = GhgFile.FromRawBytes(fileData, filePath); //validate it if (ghgModel != null) { ComplexModel = ghgModel; } } } }