--- /dev/null
+//\r
+// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)\r
+//\r
+// Authors:\r
+// Konstantin Triger <kostat@mainsoft.com>\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+//\r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+//\r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
+\r
+#if NET_2_0\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Text;\r
+\r
+namespace System.ComponentModel\r
+{\r
+ [AttributeUsageAttribute (AttributeTargets.Class)]\r
+ public sealed class DataObjectAttribute : Attribute\r
+ {\r
+ #region Fields\r
+\r
+ public static readonly DataObjectAttribute DataObject;\r
+ public static readonly DataObjectAttribute Default;\r
+ public static readonly DataObjectAttribute NonDataObject;\r
+\r
+ readonly bool _isDataObject;\r
+\r
+ #endregion\r
+\r
+ #region Constructors\r
+\r
+ static DataObjectAttribute () {\r
+ DataObject = new DataObjectAttribute (true);\r
+ NonDataObject = new DataObjectAttribute (false);\r
+ Default = NonDataObject;\r
+ }\r
+\r
+ public DataObjectAttribute () : this (true) { }\r
+ public DataObjectAttribute (bool isDataObject) {\r
+ _isDataObject = isDataObject;\r
+ }\r
+\r
+ #endregion\r
+\r
+ #region Properties\r
+\r
+ public bool IsDataObject { get { return _isDataObject; } }\r
+\r
+ #endregion\r
+\r
+ #region Methods\r
+\r
+ public override bool Equals (object obj) {\r
+ if (!(obj is DataObjectAttribute))\r
+ return false;\r
+\r
+ return ((DataObjectAttribute) obj).IsDataObject == IsDataObject;\r
+ }\r
+ public override int GetHashCode () {\r
+ return IsDataObject.GetHashCode ();\r
+ }\r
+ public override bool IsDefaultAttribute () {\r
+ return Default.Equals (this);\r
+ }\r
+\r
+ #endregion\r
+ }\r
+}\r
+\r
+#endif
\ No newline at end of file