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

62 lines
2.6 KiB
C#

using System;
using System.Diagnostics;
namespace System.Runtime.Versioning
{
/// <summary>Specifies the resource consumed by the member of a class. This class cannot be inherited.</summary>
// Token: 0x0200049A RID: 1178
[Conditional("RESOURCE_ANNOTATION_WORK")]
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, Inherited = false)]
public sealed class ResourceConsumptionAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Versioning.ResourceConsumptionAttribute" /> class specifying the scope of the consumed resource. </summary>
/// <param name="resourceScope">The <see cref="T:System.Runtime.Versioning.ResourceScope" /> for the consumed resource.</param>
// Token: 0x06002C94 RID: 11412 RVA: 0x00092AF8 File Offset: 0x00090CF8
public ResourceConsumptionAttribute(ResourceScope resourceScope)
{
this.resource = resourceScope;
this.consumption = resourceScope;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Versioning.ResourceConsumptionAttribute" /> class specifying the scope of the consumed resource and the scope of how it is consumed.</summary>
/// <param name="resourceScope">The <see cref="T:System.Runtime.Versioning.ResourceScope" /> for the consumed resource.</param>
/// <param name="consumptionScope">The <see cref="T:System.Runtime.Versioning.ResourceScope" /> used by this member.</param>
// Token: 0x06002C95 RID: 11413 RVA: 0x00092B10 File Offset: 0x00090D10
public ResourceConsumptionAttribute(ResourceScope resourceScope, ResourceScope consumptionScope)
{
this.resource = resourceScope;
this.consumption = consumptionScope;
}
/// <summary>Gets the consumption scope for this member.</summary>
/// <returns>A <see cref="T:System.Runtime.Versioning.ResourceScope" /> object specifying the resource scope used by this member.</returns>
// Token: 0x170008B1 RID: 2225
// (get) Token: 0x06002C96 RID: 11414 RVA: 0x00092B28 File Offset: 0x00090D28
public ResourceScope ConsumptionScope
{
get
{
return this.consumption;
}
}
/// <summary>Gets the resource scope for the consumed resource.</summary>
/// <returns>A <see cref="T:System.Runtime.Versioning.ResourceScope" /> object specifying the resource scope of the consumed member.</returns>
// Token: 0x170008B2 RID: 2226
// (get) Token: 0x06002C97 RID: 11415 RVA: 0x00092B30 File Offset: 0x00090D30
public ResourceScope ResourceScope
{
get
{
return this.resource;
}
}
// Token: 0x04001148 RID: 4424
private ResourceScope resource;
// Token: 0x04001149 RID: 4425
private ResourceScope consumption;
}
}