86 lines
3.9 KiB
C#
86 lines
3.9 KiB
C#
using System;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Specifies that a list can be used as a data source. A visual designer should use this attribute to determine whether to display a particular list in a data-binding picker. This class cannot be inherited.</summary>
|
|
// Token: 0x020000A4 RID: 164
|
|
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
|
|
public sealed class ListBindableAttribute : Attribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ListBindableAttribute" /> class using a value to indicate whether the list is bindable.</summary>
|
|
/// <param name="listBindable">true if the list is bindable; otherwise, false. </param>
|
|
// Token: 0x06000551 RID: 1361 RVA: 0x0000E1E0 File Offset: 0x0000C3E0
|
|
public ListBindableAttribute(bool listBindable)
|
|
{
|
|
this.bindable = listBindable;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ListBindableAttribute" /> class using <see cref="T:System.ComponentModel.BindableSupport" /> to indicate whether the list is bindable.</summary>
|
|
/// <param name="flags">A <see cref="T:System.ComponentModel.BindableSupport" /> that indicates whether the list is bindable. </param>
|
|
// Token: 0x06000552 RID: 1362 RVA: 0x0000E1F0 File Offset: 0x0000C3F0
|
|
public ListBindableAttribute(BindableSupport flags)
|
|
{
|
|
if (flags == BindableSupport.No)
|
|
{
|
|
this.bindable = false;
|
|
}
|
|
else
|
|
{
|
|
this.bindable = true;
|
|
}
|
|
}
|
|
|
|
/// <summary>Returns whether the object passed is equal to this <see cref="T:System.ComponentModel.ListBindableAttribute" />.</summary>
|
|
/// <returns>true if the object passed is equal to this <see cref="T:System.ComponentModel.ListBindableAttribute" />; otherwise, false.</returns>
|
|
/// <param name="obj">The object to test equality with. </param>
|
|
// Token: 0x06000554 RID: 1364 RVA: 0x0000E238 File Offset: 0x0000C438
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is ListBindableAttribute && ((ListBindableAttribute)obj).ListBindable.Equals(this.bindable);
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this instance.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.ListBindableAttribute" />.</returns>
|
|
// Token: 0x06000555 RID: 1365 RVA: 0x0000E26C File Offset: 0x0000C46C
|
|
public override int GetHashCode()
|
|
{
|
|
return this.bindable.GetHashCode();
|
|
}
|
|
|
|
/// <summary>Returns whether <see cref="P:System.ComponentModel.ListBindableAttribute.ListBindable" /> is set to the default value.</summary>
|
|
/// <returns>true if <see cref="P:System.ComponentModel.ListBindableAttribute.ListBindable" /> is set to the default value; otherwise, false.</returns>
|
|
// Token: 0x06000556 RID: 1366 RVA: 0x0000E27C File Offset: 0x0000C47C
|
|
public override bool IsDefaultAttribute()
|
|
{
|
|
return this.Equals(ListBindableAttribute.Default);
|
|
}
|
|
|
|
/// <summary>Gets whether the list is bindable.</summary>
|
|
/// <returns>true if the list is bindable; otherwise, false.</returns>
|
|
// Token: 0x17000160 RID: 352
|
|
// (get) Token: 0x06000557 RID: 1367 RVA: 0x0000E28C File Offset: 0x0000C48C
|
|
public bool ListBindable
|
|
{
|
|
get
|
|
{
|
|
return this.bindable;
|
|
}
|
|
}
|
|
|
|
/// <summary>Represents the default value for <see cref="T:System.ComponentModel.ListBindableAttribute" />.</summary>
|
|
// Token: 0x0400018A RID: 394
|
|
public static readonly ListBindableAttribute Default = new ListBindableAttribute(true);
|
|
|
|
/// <summary>Specifies that the list is not bindable. This static field is read-only.</summary>
|
|
// Token: 0x0400018B RID: 395
|
|
public static readonly ListBindableAttribute No = new ListBindableAttribute(false);
|
|
|
|
/// <summary>Specifies that the list is bindable. This static field is read-only.</summary>
|
|
// Token: 0x0400018C RID: 396
|
|
public static readonly ListBindableAttribute Yes = new ListBindableAttribute(true);
|
|
|
|
// Token: 0x0400018D RID: 397
|
|
private bool bindable;
|
|
}
|
|
}
|