ImportModule() public method

public ImportModule ( string modulePath ) : void
modulePath string
return void
Exemplo n.º 1
0
        private static void LoadModules(RunspaceDispatcher runspace)
        {
            // We store our PS module file at <extension root>\Modules\NuGet\NuGet.psd1
            string extensionRoot = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string modulePath    = Path.Combine(extensionRoot, "Modules", "NuGet", "NuGet.psd1");

            runspace.ImportModule(modulePath);


            // provide backdoor to enable function test
            string functionalTestPath = Environment.GetEnvironmentVariable("NuGetFunctionalTestPath");

            if (functionalTestPath != null && File.Exists(functionalTestPath))
            {
                runspace.ImportModule(functionalTestPath);
            }
#if DEBUG
            else
            {
                if (File.Exists(DebugConstants.TestModulePath))
                {
                    runspace.ImportModule(DebugConstants.TestModulePath);
                }
            }
#endif
        }
Exemplo n.º 2
0
        private static void LoadModules(RunspaceDispatcher runspace)
        {
            // We store our PS module file at <extension root>\Modules\NuGet\NuGet.psd1
            string extensionRoot = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string modulePath    = Path.Combine(extensionRoot, "Modules", "NuGet", "NuGet.psd1");

            runspace.ImportModule(modulePath);

#if DEBUG
            if (File.Exists(DebugConstants.TestModulePath))
            {
                runspace.ImportModule(DebugConstants.TestModulePath);
            }
#endif
        }
Exemplo n.º 3
0
        private static void LoadModules(RunspaceDispatcher runspace)
        {
            // We store our PS module file at <extension root>\Modules\NuGet\NuGet.psd1
            string extensionRoot = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string modulePath = Path.Combine(extensionRoot, "Modules", "NuGet", "NuGet.psd1");
            runspace.ImportModule(modulePath);

#if DEBUG
            if (File.Exists(DebugConstants.TestModulePath))
            {
                runspace.ImportModule(DebugConstants.TestModulePath);
            }
#endif
        }
Exemplo n.º 4
0
        private static void LoadModules(RunspaceDispatcher runspace)
        {
            // We store our PS module file at <extension root>\Modules\NuGet\NuGet.psd1
            string extensionRoot = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string modulePath = Path.Combine(extensionRoot, "Modules", "NuGet", "NuGet.psd1");
            runspace.ImportModule(modulePath);


            // provide backdoor to enable function test
            string functionalTestPath = Environment.GetEnvironmentVariable("NuGetFunctionalTestPath");
            if (functionalTestPath != null && File.Exists(functionalTestPath))
            {
                runspace.ImportModule(functionalTestPath);
            }
#if DEBUG
            else
            {
                if (File.Exists(DebugConstants.TestModulePath))
                {
                    runspace.ImportModule(DebugConstants.TestModulePath);
                }
            }
#endif
        }