internal ReportWrapper(Report report) {
     _report = report;
 }
Пример #2
0
 internal Report Clone() {
     var res = new Report();
     res.Filename = Filename;
     return res;
 }
        public void AddProfile(string filename) {
            uint prevSibling, newId;
            if (_target.Reports == null) {
                _target.Reports = new Reports(new[] { new Report(filename) });
                prevSibling = VSConstants.VSITEMID_NIL;
                newId = StartingReportId;
            } else {
                if (_target.Reports.Report == null) {
                    _target.Reports.Report = new Report[0];
                }

                var reportIds = Reports.Keys.ToArray();
                if (reportIds.Length > 0) {
                    prevSibling = (uint)reportIds[reportIds.Length - 1];
                    newId = prevSibling + 1;
                } else {
                    prevSibling = VSConstants.VSITEMID_NIL;
                    newId = StartingReportId;
                }

                Reports[(int)newId] = new Report(filename);
            }

            OnItemAdded(
                ReportsItemId,
                prevSibling,
                newId
            );

            MarkDirty();
        }