Beispiel #1
0
 // Token: 0x06001610 RID: 5648 RVA: 0x00052A0B File Offset: 0x00050C0B
 public static bool TryToProxyOutputObject(ICmdletProxyable cmdletProxyableObject, TaskContext context, string remoteServerFqdn, int remoteServerVersion, bool shouldAsyncProxy, LocalizedString confirmationMessage, CmdletProxyInfo.ChangeCmdletProxyParametersDelegate changeCmdletProxyParameters)
 {
     if (CmdletProxy.ShouldProxyCmdlet(context, remoteServerFqdn, remoteServerVersion))
     {
         cmdletProxyableObject.SetProxyInfo(new CmdletProxyInfo(remoteServerFqdn, remoteServerVersion, shouldAsyncProxy, confirmationMessage, changeCmdletProxyParameters));
         return(true);
     }
     return(false);
 }
Beispiel #2
0
        // Token: 0x0600160F RID: 5647 RVA: 0x000529D0 File Offset: 0x00050BD0
        public static bool TryToProxyOutputObject(ICmdletProxyable cmdletProxyableObject, TaskContext context, ADUser user, bool shouldAsyncProxy, LocalizedString confirmationMessage, CmdletProxyInfo.ChangeCmdletProxyParametersDelegate changeCmdletProxyParameters)
        {
            if (user == null)
            {
                return(false);
            }
            int    remoteServerVersion;
            string remoteServerForADUser = TaskHelper.GetRemoteServerForADUser(user, new Task.TaskVerboseLoggingDelegate(context.CommandShell.WriteVerbose), out remoteServerVersion);

            return(CmdletProxy.TryToProxyOutputObject(cmdletProxyableObject, context, remoteServerForADUser, remoteServerVersion, shouldAsyncProxy, confirmationMessage, changeCmdletProxyParameters));
        }
        // Token: 0x0600163F RID: 5695 RVA: 0x000538E0 File Offset: 0x00051AE0
        public override bool WriteObject(object input, out object output)
        {
            output = input;
            ICmdletProxyable cmdletProxyable = input as ICmdletProxyable;

            if (cmdletProxyable == null)
            {
                return(true);
            }
            CmdletProxyInfo cmdletProxyInfo = cmdletProxyable.GetProxyInfo() as CmdletProxyInfo;

            if (cmdletProxyInfo == null)
            {
                return(true);
            }
            this.ProxyCmdlet(cmdletProxyInfo);
            return(false);
        }