Beispiel #1
0
 private void InitializeSessionVars()
 {
     if (rspace.RunspaceAvailability == RunspaceAvailability.Available)
     {
         PSAlert = new psmethods.PSAlert(frm);
         PSRoot = new psvariables.PSRoot("PSRoot");
         PSStatus = new psmethods.PSStatus(frm, scriptlvw);
         PSModRoot = new psvariables.PSModRoot("PSModRoot");
         PSFramework = new psvariables.PSFramework("PSFramework");
         PSExec = new psvariables.PSExec("PSExec");
         PSMessageBox = new psmethods.PSMessageBox();
         PSTab = new psmethods.PSTab(frm);
         PSHosts = new psmethods.PSHosts(frm);
         rspace.SessionStateProxy.PSVariable.Set(PSRoot);
         rspace.SessionStateProxy.PSVariable.Set(PSModRoot);
         rspace.SessionStateProxy.PSVariable.Set(PSFramework);
         rspace.SessionStateProxy.PSVariable.Set(PSExec);
         rspace.SessionStateProxy.SetVariable("PSMessageBox", PSMessageBox);
         rspace.SessionStateProxy.SetVariable("PSAlert", PSAlert);
         rspace.SessionStateProxy.SetVariable("PSStatus", PSStatus);
         rspace.SessionStateProxy.SetVariable("PSHosts", PSHosts);
         rspace.SessionStateProxy.SetVariable("PSTab", PSTab);
     }
 }
Beispiel #2
0
 private void InitializeSessionVars()
 {
     if (rspace.RunspaceAvailability == RunspaceAvailability.Available)
     {
         PSAlert      = new psmethods.PSAlert(frm);
         PSRoot       = new psvariables.PSRoot("PSRoot");
         PSStatus     = new psmethods.PSStatus(frm, scriptlvw);
         PSModRoot    = new psvariables.PSModRoot("PSModRoot");
         PSFramework  = new psvariables.PSFramework("PSFramework");
         PSExec       = new psvariables.PSExec("PSExec");
         PSMessageBox = new psmethods.PSMessageBox();
         PSTab        = new psmethods.PSTab(frm);
         PSHosts      = new psmethods.PSHosts(frm);
         rspace.SessionStateProxy.PSVariable.Set(PSRoot);
         rspace.SessionStateProxy.PSVariable.Set(PSModRoot);
         rspace.SessionStateProxy.PSVariable.Set(PSFramework);
         rspace.SessionStateProxy.PSVariable.Set(PSExec);
         rspace.SessionStateProxy.SetVariable("PSMessageBox", PSMessageBox);
         rspace.SessionStateProxy.SetVariable("PSAlert", PSAlert);
         rspace.SessionStateProxy.SetVariable("PSStatus", PSStatus);
         rspace.SessionStateProxy.SetVariable("PSHosts", PSHosts);
         rspace.SessionStateProxy.SetVariable("PSTab", PSTab);
     }
 }