New test.
[mono.git] / mcs / class / Npgsql / Npgsql / Design / NpgsqlSysDescriptionAttribute.cs
1 using System;
2 using System.Reflection;
3 using System.Resources;
4 using System.ComponentModel;
5 using System.Windows.Forms;
6
7 namespace Npgsql.Design {
8   [AttributeUsage(AttributeTargets.Property)]
9   internal class NpgsqlSysDescriptionAttribute : DescriptionAttribute{
10     private bool replaced = false;
11     private ResourceManager resman;
12
13     public NpgsqlSysDescriptionAttribute(string ResourceName, Type ResourceClass) : base(ResourceName){
14       this.resman = new ResourceManager(ResourceClass);
15     }
16
17     public override string Description {
18       get {
19         if(this.replaced == false){
20           base.DescriptionValue = this.resman.GetString(base.Description);
21           this.replaced = true;
22         }
23         return base.Description;
24       }
25     }
26   }
27 }