[mono/mono] [4 commits] 596921b7: Implement ManagementQuery QueryLanguage

"Marek Safar ([email protected])" <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141e43086c4-c7c7f931-0382-47a2-b9d1-23f9dcce1b72-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/3be7b103d878...ab93080478cf

   Commit: 596921b77d94a4d3e1bc260cadcf61aeae4c43a9
   Author: Alistair Leslie-Hughes <[email protected]> (alesliehughes)
     Date: 2013-10-22 21:13:32 GMT
      URL: https://github.com/mono/mono/commit/596921b77d94a4d3e1bc260cadcf61aeae4c43a9

Implement ManagementQuery QueryLanguage

Changed paths:
  M mcs/class/System.Management/System.Management/ManagementQuery.cs

Modified: mcs/class/System.Management/System.Management/ManagementQuery.cs
===================================================================
@@ -36,6 +36,8 @@ namespace System.Management
 	//[TypeConverter ("")]
 	public abstract class ManagementQuery : ICloneable
 	{
+		string sQueryLanguage;
+
 		internal ManagementQuery ()
 		{
 		}
@@ -46,10 +48,10 @@ static ManagementQuery ()
 
 		public virtual string QueryLanguage {
 			get {
-				throw new NotImplementedException ();
+				return sQueryLanguage;
 			}
 			set {
-				throw new NotImplementedException ();
+				sQueryLanguage = value;
 			}
 		}
 

   Commit: 13d44dbcbe45f2242974c0f7249dfe095d8da484
   Author: Alistair Leslie-Hughes <[email protected]> (alesliehughes)
     Date: 2013-10-22 21:13:33 GMT
      URL: https://github.com/mono/mono/commit/13d44dbcbe45f2242974c0f7249dfe095d8da484

Implement ManagementQuery QueryString

Changed paths:
  M mcs/class/System.Management/System.Management/ManagementQuery.cs

Modified: mcs/class/System.Management/System.Management/ManagementQuery.cs
===================================================================
@@ -37,6 +37,7 @@ namespace System.Management
 	public abstract class ManagementQuery : ICloneable
 	{
 		string sQueryLanguage;
+		string sQueryString;
 
 		internal ManagementQuery ()
 		{
@@ -57,10 +58,10 @@ static ManagementQuery ()
 
 		public virtual string QueryString {
 			get {
-				throw new NotImplementedException ();
+				return sQueryString;
 			}
 			set {
-				throw new NotImplementedException ();
+				sQueryString = value;
 			}
 		}
 

   Commit: b1d551265a94c96dd163aeb2bff20398e03609dd
   Author: Alistair Leslie-Hughes <[email protected]> (alesliehughes)
     Date: 2013-10-22 21:13:34 GMT
      URL: https://github.com/mono/mono/commit/b1d551265a94c96dd163aeb2bff20398e03609dd

Implement ObjectQuery

Changed paths:
  M mcs/class/System.Management/System.Management/ManagementQuery.cs
  M mcs/class/System.Management/System.Management/ObjectQuery.cs

Modified: mcs/class/System.Management/System.Management/ManagementQuery.cs
===================================================================
@@ -43,6 +43,17 @@ internal ManagementQuery ()
 		{
 		}
 
+		internal ManagementQuery (string query)
+		{
+			QueryString = query;
+		}
+
+		internal ManagementQuery (string language, string query)
+		{
+			QueryLanguage = language;
+			QueryString = query;
+		}
+
 		static ManagementQuery ()
 		{
 		}

Modified: mcs/class/System.Management/System.Management/ObjectQuery.cs
===================================================================
@@ -29,27 +29,23 @@
 
 namespace System.Management
 {
-	[MonoTODO ("System.Management is not implemented")]
 	public class ObjectQuery : ManagementQuery
 	{
 		public ObjectQuery ()
 		{
-			throw new NotImplementedException ();
 		}
 
-		public ObjectQuery (string query)
+		public ObjectQuery (string query) : base(query)
 		{
-			throw new NotImplementedException ();
 		}
 
-		public ObjectQuery (string language, string query)
+		public ObjectQuery (string language, string query) : base(language, query)
 		{
-			throw new NotImplementedException ();
 		}
 
 		public override object Clone ()
 		{
-			throw new NotImplementedException ();
+			return new ObjectQuery(this.QueryLanguage, this.QueryString);
 		}
 	}
 }

   Commit: ab93080478cf7d5c158e34f6ce04bca6efdb9f21
   Author: Marek Safar <[email protected]> (marek-safar)
     Date: 2013-10-23 07:17:22 GMT
      URL: https://github.com/mono/mono/commit/ab93080478cf7d5c158e34f6ce04bca6efdb9f21

Merge pull request #784 from alesliehughes/master

Support for ManagementQuery and ObjectQuery classes

Changed paths:
  M mcs/class/System.Management/System.Management/ManagementQuery.cs
  M mcs/class/System.Management/System.Management/ObjectQuery.cs

Modified: mcs/class/System.Management/System.Management/ManagementQuery.cs
===================================================================
@@ -36,29 +36,43 @@ namespace System.Management
 	//[TypeConverter ("")]
 	public abstract class ManagementQuery : ICloneable
 	{
+		string sQueryLanguage;
+		string sQueryString;
+
 		internal ManagementQuery ()
 		{
 		}
 
+		internal ManagementQuery (string query)
+		{
+			QueryString = query;
+		}
+
+		internal ManagementQuery (string language, string query)
+		{
+			QueryLanguage = language;
+			QueryString = query;
+		}
+
 		static ManagementQuery ()
 		{
 		}
 
 		public virtual string QueryLanguage {
 			get {
-				throw new NotImplementedException ();
+				return sQueryLanguage;
 			}
 			set {
-				throw new NotImplementedException ();
+				sQueryLanguage = value;
 			}
 		}
 
 		public virtual string QueryString {
 			get {
-				throw new NotImplementedException ();
+				return sQueryString;
 			}
 			set {
-				throw new NotImplementedException ();
+				sQueryString = value;
 			}
 		}
 

Modified: mcs/class/System.Management/System.Management/ObjectQuery.cs
===================================================================
@@ -29,27 +29,23 @@
 
 namespace System.Management
 {
-	[MonoTODO ("System.Management is not implemented")]
 	public class ObjectQuery : ManagementQuery
 	{
 		public ObjectQuery ()
 		{
-			throw new NotImplementedException ();
 		}
 
-		public ObjectQuery (string query)
+		public ObjectQuery (string query) : base(query)
 		{
-			throw new NotImplementedException ();
 		}
 
-		public ObjectQuery (string language, string query)
+		public ObjectQuery (string language, string query) : base(language, query)
 		{
-			throw new NotImplementedException ();
 		}
 
 		public override object Clone ()
 		{
-			throw new NotImplementedException ();
+			return new ObjectQuery(this.QueryLanguage, this.QueryString);
 		}
 	}
 }


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.