public static InputHistory ParseLine(string line) { InputHistory b = new InputHistory(); b.FileCode = line.Substring(1, 1); b.DocumentType = line.Substring(2, 3); b.FormatVersion = Double.Parse(line.Substring(6, 4)); b.CreationAgencyCode = line.Substring(11, 3); b.CreationTime = Time.ParseYds(line.Substring(15, 12)); b.DataProvidingAgencyCode = line.Substring(28, 3); b.StartTime = Time.ParseYds(line.Substring(32, 12)); b.EndTime = Time.ParseYds(line.Substring(45, 12)); b.ObservationTechnique = line.Substring(58, 1); b.NumberOfEstimates = int.Parse(line.Substring(60, 5)); b.ConstraintCode = line.Substring(66, 1); b.SolutionContents = line.Substring(68).Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); return(b); }
public override bool Equals(object obj) { InputHistory site = obj as InputHistory; return(site == null ? false : FileCode.Equals(site.FileCode)); }