if (boundedCapacity < 1)
{
throw new ArgumentOutOfRangeException(
-nameof(boundedCapacity), boundedCapacity,
+ nameof(boundedCapacity), boundedCapacity,
SR.BlockingCollection_ctor_BoundedCapacityRange);
}
if (collection == null)
{
//The number of WaitHandles must be <= 64 for MTA, and <=63 for STA, as we reserve one for CancellationToken
throw new ArgumentOutOfRangeException(
-nameof(collections), SR.BlockingCollection_ValidateCollectionsArray_LargeSize);
+ nameof(collections), SR.BlockingCollection_ValidateCollectionsArray_LargeSize);
}
for (int i = 0; i < collections.Length; ++i)
if (collections[i]._isDisposed)
throw new ObjectDisposedException(
-nameof(collections), SR.BlockingCollection_ValidateCollectionsArray_DispElems);
+ nameof(collections), SR.BlockingCollection_ValidateCollectionsArray_DispElems);
if (isAddOperation && collections[i].IsAddingCompleted)
{
default:
throw new ArgumentOutOfRangeException(
-nameof(modification),
+ nameof(modification),
SR.ArgumentOutOfRange_Enum);
}
}
default:
throw new ArgumentOutOfRangeException(
-nameof(modification),
+ nameof(modification),
SR.ArgumentOutOfRange_Enum);
}
}
default:
throw new ArgumentOutOfRangeException(
-nameof(modification),
+ nameof(modification),
SR.ArgumentOutOfRange_Enum);
}
else if (offset < 0)
{
throw new ArgumentOutOfRangeException(
-nameof(offset),
- SR.ArgumentOutOfRange_NeedNonNegNum);
+ nameof(offset),
+ SR.ArgumentOutOfRange_NeedNonNegNum);
}
else if (binaryForm.Length - offset < BinaryLength)
{
//
throw new ArgumentOutOfRangeException(
-nameof(binaryForm),
- SR.ArgumentOutOfRange_ArrayTooSmall);
+ nameof(binaryForm),
+ SR.ArgumentOutOfRange_ArrayTooSmall);
}
else if (Length > ushort.MaxValue)
{
if (flags == AceFlags.None)
{
throw new ArgumentException(
- SR.Arg_EnumAtLeastOneFlag,
-nameof(auditFlags));
+ SR.Arg_EnumAtLeastOneFlag,
+ nameof(auditFlags));
}
return flags;
else if (offset < 0)
{
throw new ArgumentOutOfRangeException(
-nameof(offset),
- SR.ArgumentOutOfRange_NeedNonNegNum);
+ nameof(offset),
+ SR.ArgumentOutOfRange_NeedNonNegNum);
}
else if (binaryForm.Length - offset < HeaderLength)
{
//
throw new ArgumentOutOfRangeException(
-nameof(binaryForm),
- SR.ArgumentOutOfRange_ArrayTooSmall);
+ nameof(binaryForm),
+ SR.ArgumentOutOfRange_ArrayTooSmall);
}
else if ((binaryForm[offset + 3] << 8) + (binaryForm[offset + 2] << 0) > binaryForm.Length - offset)
{
//
throw new ArgumentOutOfRangeException(
-nameof(binaryForm),
- SR.ArgumentOutOfRange_ArrayTooSmall);
+ nameof(binaryForm),
+ SR.ArgumentOutOfRange_ArrayTooSmall);
}
}
InvalidParameter:
throw new ArgumentException(
- SR.ArgumentException_InvalidAceBinaryForm,
-nameof(binaryForm));
+ SR.ArgumentException_InvalidAceBinaryForm,
+ nameof(binaryForm));
}
#endregion
if (type <= AceType.MaxDefinedAceType)
{
throw new ArgumentOutOfRangeException(
-nameof(type),
- SR.ArgumentOutOfRange_InvalidUserDefinedAceType);
+ nameof(type),
+ SR.ArgumentOutOfRange_InvalidUserDefinedAceType);
}
SetOpaque(opaque);
if (opaque.Length > MaxOpaqueLength)
{
throw new ArgumentOutOfRangeException(
-nameof(opaque),
+ nameof(opaque),
SR.Format(SR.ArgumentOutOfRange_ArrayLength, 0, MaxOpaqueLength));
}
else if (opaque.Length % 4 != 0)
{
throw new ArgumentOutOfRangeException(
-nameof(opaque),
+ nameof(opaque),
SR.Format(SR.ArgumentOutOfRange_ArrayLengthMultiple, 4));
}
}
if (opaque.Length > MaxOpaqueLengthInternal)
{
throw new ArgumentOutOfRangeException(
-nameof(opaque),
+ nameof(opaque),
SR.Format(SR.ArgumentOutOfRange_ArrayLength, 0, MaxOpaqueLengthInternal));
}
else if (opaque.Length % 4 != 0)
{
throw new ArgumentOutOfRangeException(
-nameof(opaque),
+ nameof(opaque),
SR.Format(SR.ArgumentOutOfRange_ArrayLengthMultiple, 4));
}
}
throw new ArgumentException(
SR.ArgumentException_InvalidAclBinaryForm,
-nameof(binaryForm));
+ nameof(binaryForm));
}
#endregion
accessType != AccessControlType.Deny)
{
throw new ArgumentOutOfRangeException(
-nameof(accessType),
+ nameof(accessType),
SR.ArgumentOutOfRange_Enum);
}
}
{
throw new ArgumentException(
SR.Argument_InvalidAnyFlag,
-nameof(propagationFlags));
+ nameof(propagationFlags));
}
}
else if (inheritanceFlags != InheritanceFlags.None)
{
throw new ArgumentException(
SR.Argument_InvalidAnyFlag,
-nameof(inheritanceFlags));
+ nameof(inheritanceFlags));
}
else if (propagationFlags != PropagationFlags.None)
{
throw new ArgumentException(
SR.Argument_InvalidAnyFlag,
-nameof(propagationFlags));
+ nameof(propagationFlags));
}
return;
{
throw new ArgumentException(
SR.Arg_EnumAtLeastOneFlag,
-nameof(flags));
+ nameof(flags));
}
if (accessMask == 0)
{
throw new ArgumentException(
SR.Argument_ArgumentZero,
-nameof(accessMask));
+ nameof(accessMask));
}
GenericAce newAce;
{
throw new ArgumentException(
SR.Arg_EnumAtLeastOneFlag,
-nameof(flags));
+ nameof(flags));
}
if (accessMask == 0)
{
throw new ArgumentException(
SR.Argument_ArgumentZero,
-nameof(accessMask));
+ nameof(accessMask));
}
ThrowIfNotCanonical();
{
throw new ArgumentException(
SR.Argument_ArgumentZero,
-nameof(accessMask));
+ nameof(accessMask));
}
if (qualifier == AceQualifier.SystemAudit &&
{
throw new ArgumentException(
SR.Arg_EnumAtLeastOneFlag,
-nameof(flags));
+ nameof(flags));
}
if (sid == null)
{
throw new ArgumentException(
SR.Argument_ArgumentZero,
-nameof(accessMask));
+ nameof(accessMask));
}
if (qualifier == AceQualifier.SystemAudit &&
{
throw new ArgumentException(
SR.Arg_EnumAtLeastOneFlag,
-nameof(flags));
+ nameof(flags));
}
if (sid == null)
{
throw new ArgumentException(
SR.Arg_MustBeIdentityReferenceType,
-nameof(targetType));
+ nameof(targetType));
}
CommonAcl? acl = null;
default:
throw new ArgumentOutOfRangeException(
-nameof(modification),
+ nameof(modification),
SR.ArgumentOutOfRange_Enum);
}
}
default:
throw new ArgumentOutOfRangeException(
-nameof(modification),
+ nameof(modification),
SR.ArgumentOutOfRange_Enum);
}
}
default:
throw new ArgumentOutOfRangeException(
-nameof(modification),
+ nameof(modification),
SR.ArgumentOutOfRange_Enum);
}
{
throw new ArgumentException(
SR.Arg_EnumAtLeastOneFlag,
-nameof(includeSections));
+ nameof(includeSections));
}
WriteLock();
{
throw new ArgumentException(
SR.Arg_EnumAtLeastOneFlag,
-nameof(includeSections));
+ nameof(includeSections));
}
WriteLock();
{
throw new ArgumentException(
SR.AccessControl_InvalidAccessRuleType,
-nameof(rule));
+ nameof(rule));
}
WriteLock();
{
throw new ArgumentException(
SR.AccessControl_InvalidAuditRuleType,
-nameof(rule));
+ nameof(rule));
}
WriteLock();
{
throw new ArgumentException(
SR.Arg_MustBeIdentityReferenceType,
-nameof(identity));
+ nameof(identity));
}
_identity = identity;
if (binaryForm.Length - offset < BinaryLength)
{
throw new ArgumentOutOfRangeException(
-nameof(binaryForm),
+ nameof(binaryForm),
SR.ArgumentOutOfRange_ArrayTooSmall);
}
if (binaryForm.Length - offset < HeaderLength)
{
throw new ArgumentOutOfRangeException(
-nameof(binaryForm),
- SR.ArgumentOutOfRange_ArrayTooSmall);
+ nameof(binaryForm),
+ SR.ArgumentOutOfRange_ArrayTooSmall);
}
//
if ((flags & ControlFlags.SelfRelative) == 0)
{
throw new ArgumentException(
- SR.AccessControl_InvalidSecurityDescriptorSelfRelativeForm,
-nameof(binaryForm));
+ SR.AccessControl_InvalidSecurityDescriptorSelfRelativeForm,
+ nameof(binaryForm));
}
//
error == Interop.Errors.ERROR_UNKNOWN_REVISION)
{
throw new ArgumentException(
- SR.ArgumentException_InvalidSDSddlForm,
-nameof(sddlForm));
+ SR.ArgumentException_InvalidSDSddlForm,
+ nameof(sddlForm));
}
else if (error == Interop.Errors.ERROR_NOT_ENOUGH_MEMORY)
{
else if (error == Interop.Errors.ERROR_INVALID_SID)
{
throw new ArgumentException(
- SR.AccessControl_InvalidSidInSDDLString,
-nameof(sddlForm));
+ SR.AccessControl_InvalidSidInSDDLString,
+ nameof(sddlForm));
}
else if (error != Interop.Errors.ERROR_SUCCESS)
{
systemAcl.IsContainer != isContainer)
{
throw new ArgumentException(
- isContainer ?
+ isContainer ?
SR.AccessControl_MustSpecifyContainerAcl :
SR.AccessControl_MustSpecifyLeafObjectAcl,
-nameof(systemAcl));
+ nameof(systemAcl));
}
if (discretionaryAcl != null &&
discretionaryAcl.IsContainer != isContainer)
{
throw new ArgumentException(
- isContainer ?
+ isContainer ?
SR.AccessControl_MustSpecifyContainerAcl :
SR.AccessControl_MustSpecifyLeafObjectAcl,
-nameof(discretionaryAcl));
+ nameof(discretionaryAcl));
}
_isContainer = isContainer;
systemAcl.IsDS != isDS)
{
throw new ArgumentException(
- isDS ?
+ isDS ?
SR.AccessControl_MustSpecifyDirectoryObjectAcl :
SR.AccessControl_MustSpecifyNonDirectoryObjectAcl,
-nameof(systemAcl));
+ nameof(systemAcl));
}
if (discretionaryAcl != null &&
isDS ?
SR.AccessControl_MustSpecifyDirectoryObjectAcl :
SR.AccessControl_MustSpecifyNonDirectoryObjectAcl,
-nameof(discretionaryAcl));
+ nameof(discretionaryAcl));
}
_isDS = isDS;
if (value.IsContainer != this.IsContainer)
{
throw new ArgumentException(
- this.IsContainer ?
+ this.IsContainer ?
SR.AccessControl_MustSpecifyContainerAcl :
SR.AccessControl_MustSpecifyLeafObjectAcl,
-nameof(value));
+ nameof(value));
}
if (value.IsDS != this.IsDS)
this.IsDS ?
SR.AccessControl_MustSpecifyDirectoryObjectAcl :
SR.AccessControl_MustSpecifyNonDirectoryObjectAcl,
-nameof(value));
+ nameof(value));
}
}
if (value.IsContainer != this.IsContainer)
{
throw new ArgumentException(
- this.IsContainer ?
+ this.IsContainer ?
SR.AccessControl_MustSpecifyContainerAcl :
SR.AccessControl_MustSpecifyLeafObjectAcl,
-nameof(value));
+ nameof(value));
}
if (value.IsDS != this.IsDS)
{
throw new ArgumentException(
- this.IsDS ?
+ this.IsDS ?
SR.AccessControl_MustSpecifyDirectoryObjectAcl :
SR.AccessControl_MustSpecifyNonDirectoryObjectAcl,
-nameof(value));
+ nameof(value));
}
}
{
throw new ArgumentException(
SR.Argument_InvalidSafeHandle,
-nameof(handle));
+ nameof(handle));
}
else
{
{
throw new ArgumentException(
SR.Argument_InvalidSafeHandle,
-nameof(handle));
+ nameof(handle));
}
else
{