Пример #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);
            }
        }