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

b1f6c1c4 / ProfessionalAccounting / 320

16 Oct 2024 05:07PM UTC coverage: 55.799% (-1.1%) from 56.944%
320

push

appveyor

b1f6c1c4
final taobao

6264 of 11226 relevant lines covered (55.8%)

126.37 hits per line

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

81.82
/AccountingServer.Entities/Util/QueryBase.cs
1
/* Copyright (C) 2020-2024 b1f6c1c4
2
 *
3
 * This file is part of ProfessionalAccounting.
4
 *
5
 * ProfessionalAccounting is free software: you can redistribute it and/or
6
 * modify it under the terms of the GNU Affero General Public License as
7
 * published by the Free Software Foundation, version 3.
8
 *
9
 * ProfessionalAccounting is distributed in the hope that it will be useful, but
10
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License
12
 * for more details.
13
 *
14
 * You should have received a copy of the GNU Affero General Public License
15
 * along with ProfessionalAccounting.  If not, see
16
 * <https://www.gnu.org/licenses/>.
17
 */
18

19
using System;
20
using System.Collections.Generic;
21

22
namespace AccountingServer.Entities.Util;
23

24
public sealed class DetailQueryUnconstrained : IDetailQueryAtom
25
{
26
    private DetailQueryUnconstrained() { }
1✔
27
    public static IDetailQueryAtom Instance { get; } = new DetailQueryUnconstrained();
1✔
28

29
    public TitleKind? Kind => null;
1,016✔
30

31
    public bool? IsPseudoCurrency => null;
1,016✔
32

33
    public VoucherDetail Filter { get; } = new();
1✔
34

35
    public bool IsFundBidirectional => false;
229✔
36

37
    public int Dir => 0;
1,016✔
38

39
    public string ContentPrefix => null;
1,018✔
40

41
    public string RemarkPrefix => null;
1,018✔
42

43
    public bool IsDangerous() => true;
×
44

45
    public T Accept<T>(IQueryVisitor<IDetailQueryAtom, T> visitor) => visitor.Visit(this);
1,018✔
46
}
47

48
public sealed class VoucherQueryUnconstrained : IVoucherQueryAtom
49
{
50
    private VoucherQueryUnconstrained() { }
1✔
51
    public static IVoucherQueryAtom Instance { get; } = new VoucherQueryUnconstrained();
1✔
52

53
    public bool ForAll => true;
840✔
54

55
    public Voucher VoucherFilter { get; } = new();
1✔
56

57
    public DateFilter Range => DateFilter.Unconstrained;
841✔
58

59
    public string RemarkPrefix => null;
841✔
60

61
    public IQueryCompounded<IDetailQueryAtom> DetailFilter => DetailQueryUnconstrained.Instance;
1,017✔
62

63
    public bool IsDangerous() => true;
×
64

65
    public T Accept<T>(IQueryVisitor<IVoucherQueryAtom, T> visitor) => visitor.Visit(this);
841✔
66
}
67

68
public sealed class DistributedQueryUnconstrained : IDistributedQueryAtom
69
{
70
    private DistributedQueryUnconstrained() { }
1✔
71
    public static IDistributedQueryAtom Instance { get; } = new DistributedQueryUnconstrained();
1✔
72

73
    public IDistributed Filter { get; } = new TheFilter();
1✔
74

75
    public DateFilter Range => DateFilter.Unconstrained;
195✔
76

77
    public bool IsDangerous() => true;
×
78

79
    public T Accept<T>(IQueryVisitor<IDistributedQueryAtom, T> visitor) => visitor.Visit(this);
195✔
80

81
    private sealed class TheFilter : IDistributed
82
    {
83
        public Guid? ID => null;
195✔
84

85
        public string User => null;
388✔
86

87
        public string Name => null;
195✔
88

89
        public DateTime? Date => null;
×
90

91
        public double? Value => null;
×
92

93
        public string Remark => null;
195✔
94

95
        public IEnumerable<IDistributedItem> TheSchedule => null;
×
96
    }
97
}
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