Merge pull request #3012 from marek-safar/rs-Net
[mono.git] / mcs / class / System.Management / System.Management / ManagementObjectSearcher.cs
index f83f66f4db48eee7dcd097c38c4fc4d6e734923e..f79d9662bcdc3b3fe12393e402137f0297d4c6d7 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-
 using System.ComponentModel;
 
 namespace System.Management
 {
-       [MonoTODO ("System.Management is not implemented")]
        [ToolboxItem (false)]
        public class ManagementObjectSearcher : Component
        {
+               ObjectQuery mQueryObject;
+
                public ManagementObjectSearcher ()
                {
-                       throw CreateNotImplementedException ();
+                       mQueryObject = new ObjectQuery ();
                }
 
                public ManagementObjectSearcher (ObjectQuery query)
                {
-                       throw CreateNotImplementedException ();
+                       mQueryObject = (ObjectQuery)query.Clone ();
                }
 
                public ManagementObjectSearcher (string queryString)
                {
-                       throw CreateNotImplementedException ();
+                       mQueryObject = new ObjectQuery (queryString);
                }
 
                public ManagementObjectSearcher (ManagementScope scope, ObjectQuery query)
                {
-                       throw CreateNotImplementedException ();
+                       throw new NotImplementedException ();
                }
 
                public ManagementObjectSearcher (string scope, string queryString)
                {
-                       throw CreateNotImplementedException ();
+                       throw new NotImplementedException ();
                }
 
                public ManagementObjectSearcher (ManagementScope scope, ObjectQuery query, EnumerationOptions options)
                {
-                       throw CreateNotImplementedException ();
+                       throw new NotImplementedException ();
                }
 
                public ManagementObjectSearcher (string scope, string queryString, EnumerationOptions options)
                {
-                       throw CreateNotImplementedException ();
+                       throw new NotImplementedException ();
                }
 
                public EnumerationOptions Options {
                        get {
-                               throw CreateNotImplementedException ();
+                               throw new NotImplementedException ();
                        }
                        set {
-                               throw CreateNotImplementedException ();
+                               throw new NotImplementedException ();
                        }
                }
 
                public ObjectQuery Query {
                        get {
-                               throw CreateNotImplementedException ();
+                               return mQueryObject;
                        }
                        set {
-                               throw CreateNotImplementedException ();
+                               mQueryObject = value;
                        }
                }
 
                public ManagementScope Scope {
                        get {
-                               throw CreateNotImplementedException ();
+                               throw new NotImplementedException ();
                        }
                        set {
-                               throw CreateNotImplementedException ();
+                               throw new NotImplementedException ();
                        }
                }
 
                public ManagementObjectCollection Get ()
                {
-                       throw CreateNotImplementedException ();
+                       throw new NotImplementedException ();
                }
 
                public void Get (ManagementOperationObserver watcher)
                {
-                       throw CreateNotImplementedException ();
-               }
-
-               private static NotImplementedException CreateNotImplementedException ()
-               {
-                       return new NotImplementedException ("System.Management is not implemented.");
+                       throw new NotImplementedException ();
                }
        }
 }