MessageQueuePermissionEntry.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Messaging / System / Messaging / MessageQueuePermissionEntry.cs / 1305376 / MessageQueuePermissionEntry.cs

                            //---------------------------------------------------- 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Messaging { 
    using System.ComponentModel; 

    ///  
    [
    Serializable()
    ]
    public class MessageQueuePermissionEntry { 
        private string label;
        private string machineName; 
        private string path; 
        private string category;
        private MessageQueuePermissionAccess permissionAccess; 

        /// 
        public MessageQueuePermissionEntry(MessageQueuePermissionAccess permissionAccess, string path) {
            if (path == null) 
                throw new ArgumentNullException("path");
 
            if (path != MessageQueuePermission.Any && !MessageQueue.ValidatePath(path, false)) 
                throw new ArgumentException(Res.GetString(Res.PathSyntax));
 
            this.path = path;

            this.permissionAccess = permissionAccess;
        } 

        ///  
        public MessageQueuePermissionEntry(MessageQueuePermissionAccess permissionAccess, string machineName, string label, string category) { 
            if (machineName == null && label == null && category == null)
                throw new ArgumentNullException("machineName"); 

            if (machineName != null && !SyntaxCheck.CheckMachineName(machineName))
                throw new ArgumentException(Res.GetString(Res.InvalidParameter, "MachineName", machineName));
 
            this.permissionAccess = permissionAccess;
            this.machineName = machineName; 
            this.label = label; 
            this.category = category;
        } 

        /// 
        public string Category {
            get { 
                return this.category;
            } 
        } 

        ///  
        public string Label {
            get {
                return this.label;
            } 
        }
 
        ///  
        public string MachineName {
            get { 
                return this.machineName;
            }
        }
 
        /// 
        public string Path { 
            get { 
                return this.path;
            } 
        }

        /// 
        public MessageQueuePermissionAccess PermissionAccess { 
            get {
                return this.permissionAccess; 
            } 
        }
    } 
}


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------- 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Messaging { 
    using System.ComponentModel; 

    ///  
    [
    Serializable()
    ]
    public class MessageQueuePermissionEntry { 
        private string label;
        private string machineName; 
        private string path; 
        private string category;
        private MessageQueuePermissionAccess permissionAccess; 

        /// 
        public MessageQueuePermissionEntry(MessageQueuePermissionAccess permissionAccess, string path) {
            if (path == null) 
                throw new ArgumentNullException("path");
 
            if (path != MessageQueuePermission.Any && !MessageQueue.ValidatePath(path, false)) 
                throw new ArgumentException(Res.GetString(Res.PathSyntax));
 
            this.path = path;

            this.permissionAccess = permissionAccess;
        } 

        ///  
        public MessageQueuePermissionEntry(MessageQueuePermissionAccess permissionAccess, string machineName, string label, string category) { 
            if (machineName == null && label == null && category == null)
                throw new ArgumentNullException("machineName"); 

            if (machineName != null && !SyntaxCheck.CheckMachineName(machineName))
                throw new ArgumentException(Res.GetString(Res.InvalidParameter, "MachineName", machineName));
 
            this.permissionAccess = permissionAccess;
            this.machineName = machineName; 
            this.label = label; 
            this.category = category;
        } 

        /// 
        public string Category {
            get { 
                return this.category;
            } 
        } 

        ///  
        public string Label {
            get {
                return this.label;
            } 
        }
 
        ///  
        public string MachineName {
            get { 
                return this.machineName;
            }
        }
 
        /// 
        public string Path { 
            get { 
                return this.path;
            } 
        }

        /// 
        public MessageQueuePermissionAccess PermissionAccess { 
            get {
                return this.permissionAccess; 
            } 
        }
    } 
}


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK