Files
2026-06-04 11:42:34 +02:00

122 lines
6.6 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security.Permissions;
namespace System.Security
{
/// <summary>The exception that is thrown when a denied host resource is detected.</summary>
// Token: 0x020005BD RID: 1469
[MonoTODO("Not supported in the runtime")]
[ComVisible(true)]
[Serializable]
public class HostProtectionException : SystemException
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.HostProtectionException" /> class with default values. </summary>
// Token: 0x060035B2 RID: 13746 RVA: 0x000B82D8 File Offset: 0x000B64D8
public HostProtectionException()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.HostProtectionException" /> class with a specified error message. </summary>
/// <param name="message">The message that describes the error.</param>
// Token: 0x060035B3 RID: 13747 RVA: 0x000B82E0 File Offset: 0x000B64E0
public HostProtectionException(string message)
: base(message)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.HostProtectionException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception. </summary>
/// <param name="message">The error message that explains the reason for the exception. </param>
/// <param name="e">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
// Token: 0x060035B4 RID: 13748 RVA: 0x000B82EC File Offset: 0x000B64EC
public HostProtectionException(string message, Exception e)
: base(message, e)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.HostProtectionException" /> class with a specified error message, the protected host resources, and the host resources that caused the exception to be thrown.</summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="protectedResources">A bitwise combination of the <see cref="T:System.Security.Permissions.HostProtectionResource" /> values indicating the host resources that are inaccessible to partially trusted code.</param>
/// <param name="demandedResources">A bitwise combination of the <see cref="T:System.Security.Permissions.HostProtectionResource" /> values indicating the demanded host resources.</param>
// Token: 0x060035B5 RID: 13749 RVA: 0x000B82F8 File Offset: 0x000B64F8
public HostProtectionException(string message, HostProtectionResource protectedResources, HostProtectionResource demandedResources)
: base(message)
{
this._protected = protectedResources;
this._demanded = demandedResources;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.HostProtectionException" /> class using the provided serialization information and streaming context.</summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">Contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is null.</exception>
// Token: 0x060035B6 RID: 13750 RVA: 0x000B8310 File Offset: 0x000B6510
protected HostProtectionException(SerializationInfo info, StreamingContext context)
{
this.GetObjectData(info, context);
}
/// <summary>Gets or sets the demanded host protection resources that caused the exception to be thrown.</summary>
/// <returns>A bitwise combination of the <see cref="T:System.Security.Permissions.HostProtectionResource" /> values identifying the protection resources causing the exception to be thrown. The default is <see cref="F:System.Security.Permissions.HostProtectionResource.None" />. </returns>
// Token: 0x17000A86 RID: 2694
// (get) Token: 0x060035B7 RID: 13751 RVA: 0x000B8320 File Offset: 0x000B6520
public HostProtectionResource DemandedResources
{
get
{
return this._demanded;
}
}
/// <summary>Gets or sets the host protection resources that are inaccessible to partially trusted code.</summary>
/// <returns>A bitwise combination of the <see cref="T:System.Security.Permissions.HostProtectionResource" /> values identifying the inaccessible host protection categories. The default is <see cref="F:System.Security.Permissions.HostProtectionResource.None" />.</returns>
// Token: 0x17000A87 RID: 2695
// (get) Token: 0x060035B8 RID: 13752 RVA: 0x000B8328 File Offset: 0x000B6528
public HostProtectionResource ProtectedResources
{
get
{
return this._protected;
}
}
/// <summary>Sets the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with information about the host protection exception.</summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is null. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x060035B9 RID: 13753 RVA: 0x000B8330 File Offset: 0x000B6530
[MonoTODO]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
}
/// <summary>Returns a string representation of the current host protection exception.</summary>
/// <returns>A string representation of the current <see cref="T:System.Security.HostProtectionException" />.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x060035BA RID: 13754 RVA: 0x000B8344 File Offset: 0x000B6544
[MonoTODO]
public override string ToString()
{
return base.ToString();
}
// Token: 0x04001609 RID: 5641
private HostProtectionResource _protected;
// Token: 0x0400160A RID: 5642
private HostProtectionResource _demanded;
}
}