Beispiel #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);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Adds the code to the list.
 /// </summary>
 /// <param name="code">The code.</param>
 internal void AddCode(ImportUserTypeCode code)
 {
     codeGenCode.Add(code.Options.Serialize(), code);
 }