< Summary

Class:SharpHoundCommonLib.LdapResult<T>
Assembly:SharpHoundCommonLib
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\CommonLib\LdapResult.cs
Covered lines:12
Uncovered lines:6
Coverable lines:18
Total lines:30
Line coverage:66.6% (12 of 18)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%10100%
Ok(...)100%10100%
Fail()100%10100%
Fail(...)100%100%
Fail(...)100%100%

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\CommonLib\LdapResult.cs

#LineLine coverage
 1using System;
 2
 3namespace SharpHoundCommonLib {
 4    public class LdapResult<T> : Result<T>
 5    {
 296        public string QueryInfo { get; set; }
 297        public int ErrorCode { get; set; }
 8
 589        protected LdapResult(T value, bool success, string error, string queryInfo, int errorCode) : base(value, success
 2910            QueryInfo = queryInfo;
 2911            ErrorCode = errorCode;
 2912        }
 13
 1614        public new static LdapResult<T> Ok(T value) {
 1615            return new LdapResult<T>(value, true, string.Empty, null, 0);
 1616        }
 17
 1318        public new static LdapResult<T> Fail() {
 1319            return new LdapResult<T>(default, false, string.Empty, null, 0);
 1320        }
 21
 022        public static LdapResult<T> Fail(string message, LdapQueryParameters queryInfo) {
 023            return new LdapResult<T>(default, false, message, queryInfo.GetQueryInfo(), 0);
 024        }
 25
 026        public static LdapResult<T> Fail(string message, LdapQueryParameters queryInfo, int errorCode) {
 027            return new LdapResult<T>(default, false, message, queryInfo.GetQueryInfo(), errorCode);
 028        }
 29    }
 30}