protected ViewSpecList LoadViews(string filename) { using (var stream = File.OpenRead(filename)) { var reportOrViewSpecs = ReportSharing.DeserializeReportList(stream); return(new ViewSpecList(ReportSharing.ConvertAll(reportOrViewSpecs, ((SkylineDataSchema)DataSchema).Document))); } }
public ReportOrViewSpecList(ReportSpecList oldList) { RevisionIndex = oldList.RevisionIndex; var oldReports = oldList.Select(item => new ReportOrViewSpec(item)); var convertedReports = ReportSharing.ConvertAll(oldReports, new SrmDocument(SrmSettingsList.GetDefault())); AddRange(convertedReports.Select(view => new ReportOrViewSpec(view))); ValidateLoad(); }
public ReportOrViewSpecList(ReportSpecList oldList) { RevisionIndex = oldList.RevisionIndex; var oldReports = oldList.Select(item => new ReportOrViewSpec(item)); var convertedReports = ReportSharing.ConvertAll(oldReports, new SrmDocument(SrmSettingsList.GetDefault())); AddRange(convertedReports.Select(view => new ReportOrViewSpec(view))); // ReSharper disable once VirtualMemberCallInConstructor ValidateLoad(); }