forked from zzzprojects/System.Linq.Dynamic.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssemblyBuilderFactory.cs
More file actions
25 lines (24 loc) · 855 Bytes
/
AssemblyBuilderFactory.cs
File metadata and controls
25 lines (24 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#if !UAP10_0
using System.Reflection;
using System.Reflection.Emit;
namespace System.Linq.Dynamic.Core
{
internal static class AssemblyBuilderFactory
{
/// <summary>
/// Defines a dynamic assembly that has the specified name and access rights.
/// </summary>
/// <param name="name">The name of the assembly.</param>
/// <param name="access">The access rights of the assembly.</param>
/// <returns>An object that represents the new assembly.</returns>
public static AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)
{
#if (NET35 || NET40 || SILVERLIGHT)
return AppDomain.CurrentDomain.DefineDynamicAssembly(name, access);
#else
return AssemblyBuilder.DefineDynamicAssembly(name, access);
#endif
}
}
}
#endif