88 lines
4.9 KiB
C#
88 lines
4.9 KiB
C#
using System;
|
|
|
|
namespace System.Security.AccessControl
|
|
{
|
|
/// <summary>Represents an Access Control Entry (ACE) that is not defined by one of the members of the <see cref="T:System.Security.AccessControl.AceType" /> enumeration.</summary>
|
|
// Token: 0x020004B9 RID: 1209
|
|
public sealed class CustomAce : GenericAce
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CustomAce" /> class.</summary>
|
|
/// <param name="type">Type of the new Access Control Entry (ACE). This value must be greater than <see cref="F:System.Security.AccessControl.AceType.MaxDefinedAceType" />.</param>
|
|
/// <param name="flags">Flags that specify information about the inheritance, inheritance propagation, and auditing conditions for the new ACE.</param>
|
|
/// <param name="opaque">An array of byte values that contains the data for the new ACE. This value can be null. The length of this array must not be greater than the value of the <see cref="F:System.Security.AccessControl.CustomAce.MaxOpaqueLength" /> field, and must be a multiple of four.</param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="type" /> parameter is not greater than <see cref="F:System.Security.AccessControl.AceType.MaxDefinedAceType" /> or the length of the <paramref name="opaque" /> array is either greater than the value of the <see cref="F:System.Security.AccessControl.CustomAce.MaxOpaqueLength" /> field or not a multiple of four.</exception>
|
|
// Token: 0x06002D0E RID: 11534 RVA: 0x0009359C File Offset: 0x0009179C
|
|
public CustomAce(AceType type, AceFlags flags, byte[] opaque)
|
|
: base(type)
|
|
{
|
|
base.AceFlags = flags;
|
|
this.SetOpaque(opaque);
|
|
}
|
|
|
|
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CustomAce" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.CustomAce.GetBinaryForm" /> method.</summary>
|
|
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CustomAce" /> object.</returns>
|
|
// Token: 0x170008D8 RID: 2264
|
|
// (get) Token: 0x06002D0F RID: 11535 RVA: 0x000935B4 File Offset: 0x000917B4
|
|
[MonoTODO]
|
|
public override int BinaryLength
|
|
{
|
|
get
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the length of the opaque data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</summary>
|
|
/// <returns>The length of the opaque callback data.</returns>
|
|
// Token: 0x170008D9 RID: 2265
|
|
// (get) Token: 0x06002D10 RID: 11536 RVA: 0x000935BC File Offset: 0x000917BC
|
|
public int OpaqueLength
|
|
{
|
|
get
|
|
{
|
|
return this.opaque.Length;
|
|
}
|
|
}
|
|
|
|
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.CustomAce" /> object into the specified byte array beginning at the specified offset.</summary>
|
|
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.CustomAce" /> is marshaled.</param>
|
|
/// <param name="offset">The offset at which to start marshaling.</param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.CustomAce" /> to be copied into <paramref name="array" />.</exception>
|
|
// Token: 0x06002D11 RID: 11537 RVA: 0x000935C8 File Offset: 0x000917C8
|
|
[MonoTODO]
|
|
public override void GetBinaryForm(byte[] binaryForm, int offset)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>Returns the opaque data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object. </summary>
|
|
/// <returns>An array of byte values that represents the opaque data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</returns>
|
|
// Token: 0x06002D12 RID: 11538 RVA: 0x000935D0 File Offset: 0x000917D0
|
|
public byte[] GetOpaque()
|
|
{
|
|
return (byte[])this.opaque.Clone();
|
|
}
|
|
|
|
/// <summary>Sets the opaque callback data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</summary>
|
|
/// <param name="opaque">An array of byte values that represents the opaque callback data for this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</param>
|
|
// Token: 0x06002D13 RID: 11539 RVA: 0x000935E4 File Offset: 0x000917E4
|
|
public void SetOpaque(byte[] opaque)
|
|
{
|
|
if (opaque == null)
|
|
{
|
|
throw new ArgumentNullException("opaque");
|
|
}
|
|
this.opaque = (byte[])opaque.Clone();
|
|
}
|
|
|
|
// Token: 0x040011D2 RID: 4562
|
|
private byte[] opaque;
|
|
|
|
/// <summary>Returns the maximum allowed length of an opaque data blob for this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</summary>
|
|
// Token: 0x040011D3 RID: 4563
|
|
[MonoTODO]
|
|
public static readonly int MaxOpaqueLength;
|
|
}
|
|
}
|