Пример #1
0
 /// <summary>
 /// Set working path from PowerShell host environment.
 /// </summary>
 /// <param name="executionContext">An $ExecutionContext object.</param>
 /// <remarks>
 /// Called from PowerShell.
 /// </remarks>
 public static void UseExecutionContext(EngineIntrinsics executionContext)
 {
     if (executionContext == null)
     {
         _GetWorkingPath = () => Directory.GetCurrentDirectory();
         return;
     }
     _GetWorkingPath = () => executionContext.SessionState.Path.CurrentFileSystemLocation.Path;
 }
Пример #2
0
 public Path(Uri uri, PathDelegate pd)
 {
     this.uri = uri;
     this.pd  = pd;
 }