Ejemplo n.º 1
0
            public static object GetTargets(IParameters parameters)
            {
                var remoteOne = new PrintTask(Output)
                {
                    Description = parameters.Required <string>("hack")
                };
                var two = new PrintTask(Output)
                {
                    Description = parameters.Required <string>("two")
                };

                var remoteBounce = new RemoteBounce();

                RemoteBounceArguments remoteOneArgs = remoteBounce.ArgumentsForTargets(new { RemoteOne = remoteOne });

                var one = new RemoteExec
                {
                    BounceArguments = remoteOneArgs,
                    Machine         = parameters.Required <string>("machine"),
                };

                return(remoteBounce.WithRemoteTargets(new {
                    One = one,
                    Two = two,
                }));
            }
Ejemplo n.º 2
0
            public static object GetTargets(IParameters parameters)
            {
                var remoteOne = new PrintTask(Output) {Description = parameters.Required<string>("hack")};
                var two = new PrintTask(Output) {Description = parameters.Required<string>("two")};

                var remoteBounce = new RemoteBounce();

                RemoteBounceArguments remoteOneArgs = remoteBounce.ArgumentsForTargets(new { RemoteOne = remoteOne });

                var one = new RemoteExec
                          {
                              BounceArguments = remoteOneArgs,
                              Machine = parameters.Required<string>("machine"),
                          };

                return remoteBounce.WithRemoteTargets(new {
                    One = one,
                    Two = two,
                });
            }