Adding empty class for eject optical drive action.
2 using System.Collections.Generic;
5 using System.Threading.Tasks;
9 using System.Collections.Generic;
10 using System.Runtime.Serialization;
13 namespace SharpLib.Ear
17 /// EAR object provides serialization support.
18 /// It assumes most derived class is decorated with AttributeObject.
21 [KnownType("DerivedTypes")]
22 public abstract class Object: IComparable
25 /// Static object name.
29 //Get the name of this object attribute
30 get { return Utils.Reflection.GetAttribute<AttributeObject>(GetType()).Name; }
35 /// Static object description.
37 public string Description
39 //Get the description of this object attribute
40 get { return Utils.Reflection.GetAttribute<AttributeObject>(GetType()).Description; }
45 /// Dynamic object description.
47 /// <returns></returns>
48 public virtual string Brief()
54 /// Needed to make sure our sorting makes sense
56 /// <param name="obj"></param>
57 /// <returns></returns>
58 public int CompareTo(object obj)
61 return Utils.Reflection.GetAttribute<AttributeObject>(GetType()).Name.CompareTo(obj.GetType());
65 /// Tells whether the current object configuration is valid.
67 /// <returns></returns>
68 public virtual bool IsValid()
74 /// So that data contract knows all our types.
76 /// <returns></returns>
77 private static IEnumerable<Type> DerivedTypes()
79 return SharpLib.Utils.Reflection.GetDerivedTypes<Object>();