1- using System ;
1+ #if ! PSV3
2+ using System ;
23using System . Collections . Generic ;
34using System . Collections . ObjectModel ;
45using System . IO ;
@@ -13,7 +14,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1314 // TODO Support for verbose mode
1415 public class ModuleDependencyHandler : IDisposable
1516 {
16- #region Private Variables
17+ #region Private Variables
1718 private Runspace runspace ;
1819 private string moduleRepository ;
1920 private string tempPath ; // path to the user temporary directory
@@ -26,9 +27,9 @@ public class ModuleDependencyHandler : IDisposable
2627 private string symLinkPath ;
2728 private string oldPSModulePath ;
2829 private string curPSModulePath ;
29- #endregion Private Variables
30+ #endregion Private Variables
3031
31- #region Properties
32+ #region Properties
3233 /// <summary>
3334 /// Path where the object stores the modules
3435 /// </summary>
@@ -123,9 +124,9 @@ public Runspace Runspace
123124 }
124125
125126
126- #endregion Properties
127+ #endregion Properties
127128
128- #region Private Methods
129+ #region Private Methods
129130 private static void ThrowIfNull < T > ( T obj , string name )
130131 {
131132 if ( obj == null )
@@ -226,9 +227,9 @@ private void RestorePSModulePath()
226227 {
227228 Environment . SetEnvironmentVariable ( "PSModulePath" , oldPSModulePath , EnvironmentVariableTarget . Process ) ;
228229 }
229- #endregion Private Methods
230+ #endregion Private Methods
230231
231- #region Public Methods
232+ #region Public Methods
232233
233234 /// <summary>
234235 /// Creates an instance of the ModuleDependencyHandler class
@@ -371,6 +372,7 @@ public bool IsModuleAvailable(string moduleName)
371372 return availableModules != null ? availableModules . Any ( ) : false ;
372373 }
373374
375+
374376 /// <summary>
375377 /// Extracts out the module names from the error extent that are not available
376378 ///
@@ -502,6 +504,7 @@ public void Dispose()
502504 RestorePSModulePath ( ) ;
503505 }
504506
505- #endregion Public Methods
507+ #endregion Public Methods
506508 }
507- }
509+ }
510+ #endif // !PSV3
0 commit comments