Exemplo n.º 1
0
        /// <summary>
        /// Defines a new script belonging to the multiscript assembly builder.
        /// </summary>
        public ScriptBuilder /*!*/ DefineModule(ScriptCompilationUnit /*!*/ compilationUnit)
        {
            string        subnamespace = ScriptModule.GetSubnamespace(compilationUnit.SourceUnit.SourceFile.RelativePath, true);
            ScriptBuilder sb           = new ScriptBuilder(compilationUnit, this, subnamespace);

            MultiScriptAssembly.AddScriptModule(compilationUnit.SourceUnit.SourceFile, sb);
            return(sb);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Defines one and only script belonging to the assembly builder.
        /// </summary>
        public ScriptBuilder /*!*/ DefineScript(ScriptCompilationUnit /*!*/ compilationUnit)
        {
            // defines a new script:
            string        subnamespace = ScriptModule.GetSubnamespace(compilationUnit.SourceUnit.SourceFile.RelativePath, true);
            ScriptBuilder sb           = new ScriptBuilder(compilationUnit, this, subnamespace);

            // adds the script into script assembly builder:
            this.SingleScriptAssembly.Module = sb;

            return(sb);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets a full qualified name of a script type given a sub-namespace.
        /// </summary>
        /// <param name="sourceFile">Source file.</param>
        /// <returns>The qualified name.</returns>
        public string GetQualifiedScriptTypeName(PhpSourceFile /*!*/ sourceFile)
        {
            Debug.Assert(sourceFile != null);

            return(GetQualifiedScriptTypeName(ScriptModule.GetSubnamespace(sourceFile)));
        }