Mono.CSharp.InteractiveBase.LoadPackage C# (CSharp) Method

LoadPackage() public static method

Loads the assemblies from a package
Loads the assemblies from a package. This is equivalent to passing the -pkg: command line flag to the C# compiler on the command line.
public static LoadPackage ( string pkg ) : void
pkg string
return void
        public static void LoadPackage(string pkg)
        {
            if (pkg == null){
                Error.WriteLine ("Invalid package specified");
                return;
            }

            string pkgout = "";// Driver.GetPackageFlags(pkg, null);

            string [] xargs = pkgout.Trim (new Char [] {' ', '\n', '\r', '\t'}).
                Split (new Char [] { ' ', '\t'});

            foreach (string s in xargs){
                if (s.StartsWith ("-r:") || s.StartsWith ("/r:") || s.StartsWith ("/reference:")){
                    string lib = s.Substring (s.IndexOf (':')+1);

                    Evaluator.LoadAssembly (lib);
                    continue;
                }
            }
        }