merged Sys.Web.Services 2.0 support in my branch:
[mono.git] / mcs / class / System.Messaging / System.Messaging / MessageQueuePermissionEntry.cs
index d6946eff741d0c82db775661a7907ae95370c8aa..df740995e52723e15336ac1409948297769b2417 100644 (file)
@@ -1,57 +1,84 @@
 //\r
-// System.Messaging\r
+// System.Messaging.MessageQueuePermissionEntry.cs\r
 //\r
 // Authors:\r
 //      Peter Van Isacker (sclytrack@planetinternet.be)\r
+//     Sebastien Pouliot  <sebastien@ximian.com>
 //\r
 // (C) 2003 Peter Van Isacker\r
-//\r
-using System;\r
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Messaging {
 \r
-namespace System.Messaging \r
-{\r
        [Serializable]\r
-       public class MessageQueuePermissionEntry \r
-       {               \r
-               [MonoTODO]\r
-               public MessageQueuePermissionEntry(MessageQueuePermissionAccess permissionAccess, string path)\r
-               {\r
+       public class MessageQueuePermissionEntry {
+
+               private MessageQueuePermissionAccess _permissionAccess;
+               private string _machineName;
+               private string _label;
+               private string _category;
+               private string _path;
+\r
+               public MessageQueuePermissionEntry (MessageQueuePermissionAccess permissionAccess, string path)\r
+               {
+                       if (path == null)
+                               throw new ArgumentNullException ("path");\r
+                       MessageQueuePermission.ValidatePath (path);
+
+                       _permissionAccess = permissionAccess;
+                       _path = path;\r
                }\r
                \r
-               [MonoTODO]\r
-               public MessageQueuePermissionEntry(MessageQueuePermissionAccess permissionAccess, string machineName, string label, string category)\r
-               {\r
+               public MessageQueuePermissionEntry (MessageQueuePermissionAccess permissionAccess, string machineName, string label, string category)\r
+               {
+                       if (machineName == null)
+                               throw new ArgumentNullException ("machineName");\r
+                       MessageQueuePermission.ValidateMachineName (machineName);
+
+                       _permissionAccess = permissionAccess;
+                       _machineName = machineName;
+                       _label = label;
+                       _category = category;
                }\r
                \r
-               public string Category \r
-               {\r
-                       [MonoTODO]\r
-                       get {throw new NotImplementedException();}\r
+               public string Category {\r
+                       get { return _category; }\r
                }\r
                \r
-               public string Label \r
-               {\r
-                       [MonoTODO]\r
-                       get {throw new NotImplementedException();}\r
+               public string Label {\r
+                       get { return _label; }\r
                }\r
 \r
-               public string MachineName \r
-               {\r
-                       [MonoTODO]\r
-                       get {throw new NotImplementedException();}\r
+               public string MachineName {\r
+                       get { return _machineName; }\r
                }\r
                \r
-               public string Path \r
-               {\r
-                       [MonoTODO]\r
-                       get {throw new NotImplementedException();}\r
+               public string Path {\r
+                       get { return _path; }\r
                }\r
                \r
-               \r
-               public MessageQueuePermissionAccess PermissionAccess \r
-               {\r
-                       [MonoTODO]\r
-                       get {throw new NotImplementedException();}\r
+               public MessageQueuePermissionAccess PermissionAccess {\r
+                       get { return _permissionAccess; }\r
                }\r
        }\r
 }\r