mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
* list.unix: added new files. * System.ComponentModel/ListBindableAttribute.cs: implemented. svn path=/trunk/mcs/; revision=8821
70 lines
1.5 KiB
C#
70 lines
1.5 KiB
C#
//
|
|
// System.ComponentModel.ListBindableAttribute
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2002 Ximian, Inc (http://www.ximian.com)
|
|
//
|
|
|
|
using System;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
|
|
public sealed class ListBindableAttribute : Attribute
|
|
{
|
|
public static readonly ListBindableAttribute Default = new ListBindableAttribute (true, true);
|
|
public static readonly ListBindableAttribute No = new ListBindableAttribute (false, true);
|
|
public static readonly ListBindableAttribute Yes = new ListBindableAttribute (true, true);
|
|
|
|
bool deflt;
|
|
bool bindable;
|
|
|
|
private ListBindableAttribute (bool listBindable, bool deflt)
|
|
{
|
|
this.deflt = deflt;
|
|
bindable = listBindable;
|
|
}
|
|
|
|
public ListBindableAttribute (bool listBindable)
|
|
{
|
|
deflt = false;
|
|
bindable = true;
|
|
}
|
|
|
|
public ListBindableAttribute (BindableSupport flags)
|
|
{
|
|
bindable = (flags == BindableSupport.Yes);
|
|
deflt = (flags == BindableSupport.Default);
|
|
}
|
|
|
|
public override bool Equals (object obj)
|
|
{
|
|
if (!(obj is ListBindableAttribute))
|
|
return false;
|
|
|
|
return (((ListBindableAttribute) obj).bindable == bindable &&
|
|
((ListBindableAttribute) obj).deflt == deflt);
|
|
}
|
|
|
|
public override int GetHashCode ()
|
|
{
|
|
return base.GetHashCode ();
|
|
}
|
|
|
|
public override bool IsDefaultAttribute ()
|
|
{
|
|
return deflt;
|
|
}
|
|
|
|
public bool ListBindable
|
|
{
|
|
get {
|
|
return bindable;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|