示例#1
0
 public virtual void ProcessRecord(TObjectInstance objectInstance, MethodInvocationInfo methodInvocationInfo, bool passThru)
 {
     throw new NotImplementedException();
 }
示例#2
0
 public virtual void ProcessRecord(MethodInvocationInfo methodInvocationInfo)
 {
     throw new NotImplementedException();
 }
        private StartableJob DoCreateStaticMethodInvocationJob(TSession sessionForJob, MethodInvocationInfo methodInvocationInfo)
        {
            StartableJob methodInvocationJob = this.CreateStaticMethodInvocationJob(sessionForJob, methodInvocationInfo);

            if (methodInvocationJob != null)
            {
                bool discardNonPipelineResults = !this.AsJob.IsPresent;
                HandleJobOutput(
                    methodInvocationJob,
                    sessionForJob,
                    discardNonPipelineResults,
                    outputAction: null);
            }

            return(methodInvocationJob);
        }
 /// <summary>
 /// Creates a <see cref="System.Management.Automation.Job"/> object that invokes a static method in the wrapped object model.
 /// </summary>
 /// <param name="session">Remote session to invoke the method in.</param>
 /// <param name="methodInvocationInfo">Method invocation details.</param>
 /// <remarks>
 /// <para>
 /// This method shouldn't do any processing or interact with the remote session.
 /// Doing so will interfere with ThrottleLimit functionality.
 /// </para>
 /// <para>
 /// <see cref="Job.WriteObject"/> (and other methods returning job results) will block to support throttling and flow-control.
 /// Implementations of Job instance returned from this method should make sure that implementation-specific flow-control mechanism pauses further processing,
 /// until calls from <see cref="Job.WriteObject"/> (and other methods returning job results) return.
 /// </para>
 /// </remarks>
 internal abstract StartableJob CreateStaticMethodInvocationJob(TSession session, MethodInvocationInfo methodInvocationInfo);
        private StartableJob DoCreateInstanceMethodInvocationJob(TSession sessionForJob, TObjectInstance objectInstance, MethodInvocationInfo methodInvocationInfo, bool passThru, bool asJob)
        {
            StartableJob methodInvocationJob = this.CreateInstanceMethodInvocationJob(sessionForJob, objectInstance, methodInvocationInfo, passThru);

            if (methodInvocationJob != null)
            {
                bool discardNonPipelineResults = !asJob;
                HandleJobOutput(
                    methodInvocationJob,
                    sessionForJob,
                    discardNonPipelineResults,
                    outputAction: null);
            }

            return(methodInvocationJob);
        }
 /// <summary>
 /// Creates a <see cref="System.Management.Automation.Job"/> object that invokes an instance method in the wrapped object model.
 /// </summary>
 /// <param name="session">Remote session to invoke the method in.</param>
 /// <param name="objectInstance">The object on which to invoke the method.</param>
 /// <param name="methodInvocationInfo">Method invocation details.</param>
 /// <param name="passThru"><see langword="true"/> if successful method invocations should emit downstream the <paramref name="objectInstance"/> being operated on.</param>
 /// <remarks>
 /// <para>
 /// This method shouldn't do any processing or interact with the remote session.
 /// Doing so will interfere with ThrottleLimit functionality.
 /// </para>
 /// <para>
 /// <see cref="Job.WriteObject"/> (and other methods returning job results) will block to support throttling and flow-control.
 /// Implementations of Job instance returned from this method should make sure that implementation-specific flow-control mechanism pauses further processing,
 /// until calls from <see cref="Job.WriteObject"/> (and other methods returning job results) return.
 /// </para>
 /// </remarks>
 internal abstract StartableJob CreateInstanceMethodInvocationJob(TSession session, TObjectInstance objectInstance, MethodInvocationInfo methodInvocationInfo, bool passThru);
示例#7
0
 /// <summary>
 /// Combines <see cref="ProcessRecord(QueryBuilder)"/> and <see cref="ProcessRecord(TObjectInstance,Microsoft.PowerShell.Cmdletization.MethodInvocationInfo,bool)"/>.
 /// </summary>
 /// <param name="query">Query parameters</param>
 /// <param name="methodInvocationInfo">Method invocation details</param>
 /// <param name="passThru"><c>true</c> if successful method invocations should emit downstream the object instance being operated on</param>
 public virtual void ProcessRecord(QueryBuilder query, MethodInvocationInfo methodInvocationInfo, bool passThru)
 {
     throw new NotImplementedException();
 }