Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs b/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs
index 61834b75c32..511ff4622b3 100644
--- a/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs
@@ -33,9 +33,10 @@ using System.ComponentModel;
namespace System.Web.UI {
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
- public sealed class FilterableAttribute : Attribute
+ public sealed class FilterableAttribute : Attribute, IDisposable
{
private bool filterable;
+ private bool dispose;
public FilterableAttribute (bool filterable)
{
@@ -52,6 +53,20 @@ namespace System.Web.UI {
get { return filterable; }
}
+ public void Dispose ()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ private void Dispose (bool disposing)
+ {
+ if (!this.dispose) {
+ //Do nothing
+ this.dispose = true;
+ }
+ }
+
public override bool Equals (object obj)
{
if (obj != null && obj is FilterableAttribute) {