Exemplo n.º 1
0
        /// <summary>
        /// Imports user types from modules using the specified importing options.
        /// </summary>
        /// <param name="options">The importing options.</param>
        /// <param name="asAssembly">If set to <c>true</c> user types will be imported as assembly. If set to <c>false</c> user types will be imported as script code.</param>
        public void ImportUserTypes(ImportUserTypeOptions options, bool asAssembly = false)
        {
            if (asAssembly)
            {
                ImportUserTypeAssembly assembly = _AssemblyResolver_.GenerateAssembly(options);

                _CodeGenAssemblies_.Add(assembly);
            }
            else
            {
                ImportUserTypeCode code = _CodeResolver_.GenerateCode(options);

                _CodeGenCode_.Add(code);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds the assembly to the list.
 /// </summary>
 /// <param name="assembly">The assembly.</param>
 internal void AddAssembly(ImportUserTypeAssembly assembly)
 {
     codeGenAssemblies.Add(assembly.AssemblyPath, assembly);
 }