Esempio n. 1
0
        public static DeploymentResult GrantMsmqPermission(this RemoteDropkickExecutionTask remoteTask, QueuePermission permission, QueueAddress address, string @group)
        {
            string perm;
            switch (permission)
            {
                case QueuePermission.Read:
                    perm = "r";
                    break;
                case QueuePermission.Write:
                    perm = "w";
                    break;
                case QueuePermission.ReadWrite:
                    perm = "rw";
                    break;
                case QueuePermission.SetSensibleDefaults:
                    perm = "default";
                    break;
                default:
                    perm = "r";
                    break;
            }

            var t = remoteTask.SetUpRemote("grant_queue \"{0}\" \"{1}\" \"{2}\"".FormatWith(perm, @group, address.ActualUri));
            return remoteTask.ExecuteAndGetResults(t);
        }
Esempio n. 2
0
        public DeploymentResult GrantPermission(QueuePermission permission, QueueAddress address, string @group)
        {
            string perm;

            switch (permission)
            {
            case QueuePermission.Read:
                perm = "r";
                break;

            case QueuePermission.Write:
                perm = "w";
                break;

            case QueuePermission.ReadWrite:
                perm = "rw";
                break;

            case QueuePermission.SetSensibleDefaults:
                perm = "default";
                break;

            default:
                perm = "r";
                break;
            }

            var t = new RemoteCommandLineTask("dropkick.remote.exe")
            {
                Args = "grant {0} {1} {2}".FormatWith(perm, @group, address.ActualUri),
                ExecutableIsLocatedAt = @"C:\Temp\dropkick.remote\",
                Machine          = _server.Name,
                WorkingDirectory = @"C:\Temp\dropkick.remote\"
            };

            return(t.Execute());
        }
Esempio n. 3
0
        public static DeploymentResult GrantMsmqPermission(this RemoteDropkickExecutionTask remoteTask, QueuePermission permission, QueueAddress address, string @group)
        {
            string perm;

            switch (permission)
            {
            case QueuePermission.Read:
                perm = "r";
                break;

            case QueuePermission.Write:
                perm = "w";
                break;

            case QueuePermission.ReadWrite:
                perm = "rw";
                break;

            case QueuePermission.SetSensibleDefaults:
                perm = "default";
                break;

            default:
                perm = "r";
                break;
            }

            var t = remoteTask.SetUpRemote("grant_queue {0} {1} {2}".FormatWith(perm, @group, address.ActualUri));

            return(remoteTask.ExecuteAndGetResults(t));
        }
Esempio n. 4
0
        public DeploymentResult GrantPermission(QueuePermission permission, QueueAddress address, string @group)
        {
            string perm;
            switch (permission)
            {
                case QueuePermission.Read:
                    perm = "r";
                    break;
                case QueuePermission.Write:
                    perm = "w";
                    break;
                case QueuePermission.ReadWrite:
                    perm = "rw";
                    break;
                case QueuePermission.SetSensibleDefaults:
                    perm = "default";
                    break;
                default:
                    perm = "r";
                    break;
            }

            var t = new RemoteCommandLineTask("dropkick.remote.exe")
            {
                Args = "grant {0} {1} {2}".FormatWith(perm, @group, address.ActualUri),
                ExecutableIsLocatedAt = @"C:\Temp\dropkick.remote\",
                Machine = _server.Name,
                WorkingDirectory = @"C:\Temp\dropkick.remote\"
            };
            return t.Execute();
        }