public SingleSnapshotModel(String path) { this.SnapshotPath = path; this.Included = true; String[] splitedPath = path.Split(new string[] { Path.DirectorySeparatorChar.ToString() }, StringSplitOptions.None); int pathCount = splitedPath.Count(); this.EntityName = splitedPath[pathCount - 2]; this.SnapshotId = splitedPath[pathCount - 3]; this.EntityNumber = this.SnapshotId.Split('_').First(); this.ErrorNumber = this.SnapshotId.Split('_').Last(); XmlFileReader xmlFileReader = new XmlFileReader(path); this.ErrorMessage = xmlFileReader.GetErrorNodeText(); }