Exemplo n.º 1
0
        internal RemoteHostResponse ExecuteNonVoidMethod(PSHost clientHost)
        {
            if (clientHost == null)
            {
                throw RemoteHostExceptions.NewNullClientHostException();
            }
            object instance = this.SelectTargetObject(clientHost);

            return(this.ExecuteNonVoidMethodOnObject(instance));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Execute non void method.
        /// </summary>
        internal RemoteHostResponse ExecuteNonVoidMethod(PSHost clientHost)
        {
            // The clientHost can be null if the user creates a runspace object without providing
            // a host parameter.
            if (clientHost == null)
            {
                throw RemoteHostExceptions.NewNullClientHostException();
            }

            object             targetObject       = this.SelectTargetObject(clientHost);
            RemoteHostResponse remoteHostResponse = this.ExecuteNonVoidMethodOnObject(targetObject);

            return(remoteHostResponse);
        }