• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 12136273647

03 Dec 2024 09:03AM UTC coverage: 57.448% (+0.07%) from 57.382%
12136273647

push

github

JFriel
Merge branch 'develop' of https://github.com/HicServices/RDMP

11297 of 21215 branches covered (53.25%)

Branch coverage included in aggregate %.

439 of 673 new or added lines in 30 files covered. (65.23%)

5 existing lines in 4 files now uncovered.

32146 of 54407 relevant lines covered (59.08%)

17095.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/Rdmp.Core/Curation/DataHelper/RegexRedaction/RegexRedactionKey.cs
1
// Copyright (c) The University of Dundee 2024-2024
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6
using Rdmp.Core.Curation.Data;
7
using Rdmp.Core.Repositories;
8
using System;
9
using System.Collections.Generic;
10
using System.Data.Common;
11

12
namespace Rdmp.Core.Curation.DataHelper.RegexRedaction;
13

14
/// <summary>
15
/// Stores the Pks of an data entry that has a redaction
16
/// </summary>
17
public class RegexRedactionKey : DatabaseEntity, IRegexRedactionKey
18
{
19
    private int _redaction;
20
    private int _columnInfo;
21
    private string _value;
22

23
    public int RegexRedaction_ID { get => _redaction; set => SetField(ref _redaction, value); }
8✔
24
    public int ColumnInfo_ID { get => _columnInfo; set => SetField(ref _columnInfo, value); }
28✔
25

26
    public string Value { get => _value; set => SetField(ref _value, value); }
30✔
27

NEW
28
    public RegexRedactionKey() { }
×
29

30
    public RegexRedactionKey(ICatalogueRepository repository, RegexRedaction redaction, ColumnInfo pkColumn, string value)
8✔
31
    {
32
        repository.InsertAndHydrate(this, new Dictionary<string, object>
8✔
33
        {
8✔
34
            {"RegexRedaction_ID", redaction.ID },
8✔
35
            {"ColumnInfo_ID", pkColumn.ID },
8✔
36
            {"Value", value },
8✔
37
        });
8✔
38
    }
8✔
39

40
    internal RegexRedactionKey(ICatalogueRepository repository, DbDataReader r) : base(repository, r)
36✔
41
    {
42
        _redaction = Int32.Parse(r["RegexRedaction_ID"].ToString());
36✔
43
        _columnInfo = Int32.Parse(r["ColumnInfo_ID"].ToString());
36✔
44
        _value = r["Value"].ToString();
36✔
45
    }
36✔
46

47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc