src/Castle.Core/DynamicProxy/ModuleScope.cs
/// <summary>
///   Saves the specified generated assembly with the name and directory information given when this <see
///    cref = "ModuleScope" /> instance was created
///   (or with the <see cref = "DEFAULT_FILE_NAME" /> and current directory if none was given).
/// </summary>
/// <param name = "strongNamed">True if the generated assembly with a strong name should be saved (see <see
///    cref = "StrongNamedModule" />);
///   false if the generated assembly without a strong name should be saved (see <see cref = "WeakNamedModule" />.</param>
/// <remarks>
///   <para>
///     This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was
///     constructed (if any, else the current directory is used).
///   </para>
///   <para>
///     If this <see cref = "ModuleScope" /> was created without indicating that the assembly should be saved, this method does nothing.
///   </para>
/// </remarks>
/// <exception cref = "InvalidOperationException">No assembly has been generated that matches the <paramref
///    name = "strongNamed" /> parameter.
/// </exception>
/// <returns>The path of the generated assembly file, or null if no file has been generated.</returns>
Saves the specified generated assembly with the name and directory information given when this  instance was created
(or with the  and current directory if none was given).
Saves the specified generated assembly with the name and directory information given when this instance was created ( or with the and current directory if none was given ) .
public string SaveAssembly(bool strongNamed)
		{
			if (!savePhysicalAssembly)
			{
				return null;
			}
			AssemblyBuilder assemblyBuilder;
			string assemblyFileName;
			string assemblyFilePath;
			if (strongNamed)
			{
				if (StrongNamedModule == null)
				{
					throw new InvalidOperationException("No strong-named assembly has been generated.");
				}
				assemblyBuilder = (AssemblyBuilder)StrongNamedModule.Assembly;
				assemblyFileName = StrongNamedModuleName;
				assemblyFilePath = StrongNamedModule.FullyQualifiedName;
			}
			else
			{
				if (WeakNamedModule == null)
				{
					throw new InvalidOperationException("No weak-named assembly has been generated.");
				}
				assemblyBuilder = (AssemblyBuilder)WeakNamedModule.Assembly;
				assemblyFileName = WeakNamedModuleName;
				assemblyFilePath = WeakNamedModule.FullyQualifiedName;
			}
			if (File.Exists(assemblyFilePath))
			{
				File.Delete(assemblyFilePath);
			}
#if FEATURE_SERIALIZATION
			AddCacheMappings(assemblyBuilder);
#endif
			assemblyBuilder.Save(assemblyFileName);
			return assemblyFilePath;
		}
public string SaveAssembly ( bool strongNamed ) { if ( ! savePhysicalAssembly ) { return null ; } AssemblyBuilder assemblyBuilder ; string assemblyFileName ; string assemblyFilePath ; if ( strongNamed ) { if ( StrongNamedModule == null ) { throw new InvalidOperationException ( " " ) ; } assemblyBuilder = ( AssemblyBuilder ) StrongNamedModule . Assembly ; assemblyFileName = StrongNamedModuleName ; assemblyFilePath = StrongNamedModule . FullyQualifiedName ; } else { if ( WeakNamedModule == null ) { throw new InvalidOperationException ( " " ) ; } assemblyBuilder = ( AssemblyBuilder ) WeakNamedModule . Assembly ; assemblyFileName = WeakNamedModuleName ; assemblyFilePath = WeakNamedModule . FullyQualifiedName ; } if ( File . Exists ( assemblyFilePath ) ) { File . Delete ( assemblyFilePath ) ; } if FEATURE_SERIALIZATION AddCacheMappings ( assemblyBuilder ) ; endif assemblyBuilder . Save ( assemblyFileName ) ; return assemblyFilePath ; }
Saves the specified generated assembly with the name and directory information given when this  instance was created
(or with the  and current directory if none was given).
Saves the specified generated assembly with the name and directory information given when this instance was created ( or with the and current directory if none was given ) .
The path of the generated assembly file, or null if no file has been generated.
The path of the generated assembly file or null if no file has been generated .
No assembly has been generated that matches the  parameter.
No assembly has been generated that matches the parameter .
strongNamed
bool
True if the generated assembly with a strong name should be saved ;
false if the generated assembly without a strong name should be saved (see .
True if the generated assembly with a strong name should be saved ; false if the generated assembly without a strong name should be saved ( see .
remarks
This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was
constructed (if any, else the current directory is used).

If this  was created without indicating that the assembly should be saved, this method does nothing.
This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was constructed ( if any else the current directory is used ) . If this was created without indicating that the assembly should be saved this method does nothing .