Beispiel #1
0
        /// <summary>
        /// Uses the hosts search path and semantics to resolve the provided name to a SourceUnit.
        ///
        /// If the host provides a SourceUnit which is equal to an already loaded SourceUnit the
        /// previously loaded module is returned.
        ///
        /// Returns null if a module could not be found.
        /// </summary>
        /// <param name="name">an opaque parameter which has meaning to the host.  Typically a filename without an extension.</param>
        public ScriptModule UseModule(string name)
        {
            Contract.RequiresNotNull(name, "name");

            SourceUnit su = _host.ResolveSourceFileUnit(name);

            if (su == null)
            {
                return(null);
            }

            return(CompileAndPublishModule(name, su));
        }
Beispiel #2
0
 public SourceUnit ResolveSourceFileUnit(string name)
 {
     return(_host.ResolveSourceFileUnit(name));
 }