System.Web.Compilation.AssemblyBuilder.AddCodeFile C# (CSharp) Method

AddCodeFile() private method

private AddCodeFile ( string path ) : void
path string
return void
		internal void AddCodeFile (string path)
		{
			AddCodeFile (path, null, false);
		}

Same methods

AssemblyBuilder::AddCodeFile ( string path, System.Web.Compilation.BuildProvider bp ) : void
AssemblyBuilder::AddCodeFile ( string path, System.Web.Compilation.BuildProvider bp, bool isVirtual ) : void

Usage Example

        public override void GenerateCode(AssemblyBuilder assemblyBuilder)
        {
            if (!_codeGenerated)
            {
                GenerateCode();
            }

            TParser parser = Parse();

            OverrideAssemblyPrefix(parser, assemblyBuilder);

            string codeBehindSource = GetCodeBehindSource(parser);

            if (codeBehindSource != null)
            {
                assemblyBuilder.AddCodeFile(codeBehindSource, this, true);
            }

            List <string> refasms = GetReferencedAssemblies(parser);

            if (refasms != null && refasms.Count > 0)
            {
                foreach (string loc in refasms)
                {
                    assemblyBuilder.AddAssemblyReference(loc);
                }
            }

            GenerateCode(assemblyBuilder, parser, _compiler);
        }
All Usage Examples Of System.Web.Compilation.AssemblyBuilder::AddCodeFile