118 references to ResultCode
System.DirectoryServices.Protocols (118)
System\DirectoryServices\Protocols\common\DirectoryControl.cs (12)
190
ResultCode
result;
196
result = AsnDecoder.ReadEnumeratedValue<
ResultCode
>(asnSpan.Slice(sequenceContentOffset, sequenceContentLength), AsnEncodingRules.BER, out bytesConsumed);
229
ResultCode
result;
237
result = AsnDecoder.ReadEnumeratedValue<
ResultCode
>(asnSpan, AsnEncodingRules.BER, out bytesConsumed);
270
ResultCode
result;
286
result = AsnDecoder.ReadEnumeratedValue<
ResultCode
>(asnSpan, AsnEncodingRules.BER, out bytesConsumed);
358
internal AsqResponseControl(
ResultCode
result, bool criticality, byte[] controlValue) : base("1.2.840.113556.1.4.1504", controlValue, criticality, true)
363
public
ResultCode
Result { get; }
908
internal SortResponseControl(
ResultCode
result, string attributeName, bool critical, byte[] value) : base("1.2.840.113556.1.4.474", value, critical, true)
914
public
ResultCode
Result { get; }
1094
internal VlvResponseControl(int targetPosition, int count, byte[] context,
ResultCode
result, bool criticality, byte[] value) : base("2.16.840.1.113730.3.4.10", value, criticality, true)
1119
public
ResultCode
Result { get; }
System\DirectoryServices\Protocols\common\DirectoryResponse.cs (9)
11
internal DirectoryResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral)
43
public virtual
ResultCode
ResultCode { get; }
68
internal DeleteResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
73
internal AddResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
78
internal ModifyResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
83
internal ModifyDNResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
88
internal CompareResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
95
internal ExtendedResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
124
internal SearchResponse(string dn, DirectoryControl[] controls,
ResultCode
result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
System\DirectoryServices\Protocols\common\ResultCode.cs (46)
57
private static readonly Dictionary<
ResultCode
, string> s_resultCodeMapping = new Dictionary<
ResultCode
, string>(capacity: 43)
59
{
ResultCode
.Success, SR.LDAP_SUCCESS },
60
{
ResultCode
.OperationsError, SR.LDAP_OPERATIONS_ERROR },
61
{
ResultCode
.ProtocolError, SR.LDAP_PROTOCOL_ERROR },
62
{
ResultCode
.TimeLimitExceeded, SR.LDAP_TIMELIMIT_EXCEEDED },
63
{
ResultCode
.SizeLimitExceeded, SR.LDAP_SIZELIMIT_EXCEEDED },
64
{
ResultCode
.CompareFalse, SR.LDAP_COMPARE_FALSE },
65
{
ResultCode
.CompareTrue, SR.LDAP_COMPARE_TRUE },
66
{
ResultCode
.AuthMethodNotSupported, SR.LDAP_AUTH_METHOD_NOT_SUPPORTED },
67
{
ResultCode
.StrongAuthRequired, SR.LDAP_STRONG_AUTH_REQUIRED },
68
{
ResultCode
.ReferralV2, SR.LDAP_PARTIAL_RESULTS },
69
{
ResultCode
.Referral, SR.LDAP_REFERRAL },
70
{
ResultCode
.AdminLimitExceeded, SR.LDAP_ADMIN_LIMIT_EXCEEDED },
71
{
ResultCode
.UnavailableCriticalExtension, SR.LDAP_UNAVAILABLE_CRIT_EXTENSION },
72
{
ResultCode
.ConfidentialityRequired, SR.LDAP_CONFIDENTIALITY_REQUIRED },
73
{
ResultCode
.SaslBindInProgress, SR.LDAP_SASL_BIND_IN_PROGRESS },
74
{
ResultCode
.NoSuchAttribute, SR.LDAP_NO_SUCH_ATTRIBUTE },
75
{
ResultCode
.UndefinedAttributeType, SR.LDAP_UNDEFINED_TYPE },
76
{
ResultCode
.InappropriateMatching, SR.LDAP_INAPPROPRIATE_MATCHING },
77
{
ResultCode
.ConstraintViolation, SR.LDAP_CONSTRAINT_VIOLATION },
78
{
ResultCode
.AttributeOrValueExists, SR.LDAP_ATTRIBUTE_OR_VALUE_EXISTS },
79
{
ResultCode
.InvalidAttributeSyntax, SR.LDAP_INVALID_SYNTAX },
80
{
ResultCode
.NoSuchObject, SR.LDAP_NO_SUCH_OBJECT },
81
{
ResultCode
.AliasProblem, SR.LDAP_ALIAS_PROBLEM },
82
{
ResultCode
.InvalidDNSyntax, SR.LDAP_INVALID_DN_SYNTAX },
83
{
ResultCode
.AliasDereferencingProblem, SR.LDAP_ALIAS_DEREF_PROBLEM },
84
{
ResultCode
.InappropriateAuthentication, SR.LDAP_INAPPROPRIATE_AUTH },
85
{
ResultCode
.InsufficientAccessRights, SR.LDAP_INSUFFICIENT_RIGHTS },
86
{
ResultCode
.Busy, SR.LDAP_BUSY },
87
{
ResultCode
.Unavailable, SR.LDAP_UNAVAILABLE },
88
{
ResultCode
.UnwillingToPerform, SR.LDAP_UNWILLING_TO_PERFORM },
89
{
ResultCode
.LoopDetect, SR.LDAP_LOOP_DETECT },
90
{
ResultCode
.SortControlMissing, SR.LDAP_SORT_CONTROL_MISSING },
91
{
ResultCode
.OffsetRangeError, SR.LDAP_OFFSET_RANGE_ERROR },
92
{
ResultCode
.NamingViolation, SR.LDAP_NAMING_VIOLATION },
93
{
ResultCode
.ObjectClassViolation, SR.LDAP_OBJECT_CLASS_VIOLATION },
94
{
ResultCode
.NotAllowedOnNonLeaf, SR.LDAP_NOT_ALLOWED_ON_NONLEAF },
95
{
ResultCode
.NotAllowedOnRdn, SR.LDAP_NOT_ALLOWED_ON_RDN },
96
{
ResultCode
.EntryAlreadyExists, SR.LDAP_ALREADY_EXISTS },
97
{
ResultCode
.ObjectClassModificationsProhibited, SR.LDAP_NO_OBJECT_CLASS_MODS },
98
{
ResultCode
.ResultsTooLarge, SR.LDAP_RESULTS_TOO_LARGE },
99
{
ResultCode
.AffectsMultipleDsas, SR.LDAP_AFFECTS_MULTIPLE_DSAS },
100
{
ResultCode
.VirtualListViewError, SR.LDAP_VIRTUAL_LIST_VIEW_ERROR },
101
{
ResultCode
.Other, SR.LDAP_OTHER }
106
s_resultCodeMapping.TryGetValue((
ResultCode
)errorCode, out string errorMessage);
System\DirectoryServices\Protocols\common\utils.cs (17)
10
internal static bool IsResultCode(
ResultCode
code)
12
if (code >=
ResultCode
.Success && code <=
ResultCode
.SaslBindInProgress)
17
if (code >=
ResultCode
.NoSuchAttribute && code <=
ResultCode
.InvalidAttributeSyntax)
22
if (code >=
ResultCode
.NoSuchObject && code <=
ResultCode
.InvalidDNSyntax)
27
if (code >=
ResultCode
.InsufficientAccessRights && code <=
ResultCode
.LoopDetect)
32
if (code >=
ResultCode
.NamingViolation && code <=
ResultCode
.AffectsMultipleDsas)
37
return (code ==
ResultCode
.AliasDereferencingProblem || code ==
ResultCode
.InappropriateAuthentication || code ==
ResultCode
.SortControlMissing || code ==
ResultCode
.OffsetRangeError || code ==
ResultCode
.VirtualListViewError || code ==
ResultCode
.Other);
System\DirectoryServices\Protocols\Interop\LdapPal.Linux.cs (1)
153
if (error == (int)
ResultCode
.Other)
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (26)
953
if (certError != (int)
ResultCode
.Success)
978
if (error != (int)
ResultCode
.Success)
1117
if (error != (int)
ResultCode
.Success)
1119
if (Utility.IsResultCode((
ResultCode
)error))
1435
response = new AddResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1439
response = new ModifyResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1443
response = new DeleteResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1447
response = new ModifyDNResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1451
response = new CompareResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1455
response = new ExtendedResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1456
if (resultError == (int)
ResultCode
.Success)
1489
response = new SearchResponse(responseDn, responseControl, (
ResultCode
)resultError, responseMessage, responseReferral);
1534
if (resultError != (int)
ResultCode
.Success && resultError != (int)
ResultCode
.CompareFalse && resultError != (int)
ResultCode
.CompareTrue && resultError != (int)
ResultCode
.Referral && resultError != (int)
ResultCode
.ReferralV2)
1537
if (Utility.IsResultCode((
ResultCode
)resultError))
1872
if (Utility.IsResultCode((
ResultCode
)error))
1876
response = new AddResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
1880
response = new ModifyResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
1884
response = new DeleteResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
1888
response = new ModifyDNResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
1892
response = new CompareResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
1896
response = new SearchResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
1900
response = new ExtendedResponse(null, null, (
ResultCode
)error, OperationErrorMappings.MapResultCode(error), null);
System\DirectoryServices\Protocols\ldap\LdapException.cs (2)
177
if (error != (int)
ResultCode
.Success)
179
if (Utility.IsResultCode((
ResultCode
)error))
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (5)
476
if (certError != (int)
ResultCode
.Success)
643
if (error != (int)
ResultCode
.Success)
645
if (Utility.IsResultCode((
ResultCode
)error))
649
if (error == (int)
ResultCode
.Other)
655
ExtendedResponse response = new ExtendedResponse(null, null, (
ResultCode
)error, errorMessage, responseReferral);