ImportModule() public method

public ImportModule ( string modulePath ) : void
modulePath string
return void
示例#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
        }
示例#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
        }
示例#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
        }
示例#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
        }