mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 10:37:55 +08:00
转移.net core 3.1,为.NET 5做准备
This commit is contained in:
@@ -277,7 +277,8 @@ namespace Infrastructure
|
||||
|
||||
private ClassFactory() {
|
||||
AssemblyName name = new AssemblyName("DynamicClasses");
|
||||
AssemblyBuilder assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run);
|
||||
AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run);
|
||||
// AssemblyBuilder assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.Run);
|
||||
#if ENABLE_LINQ_PARTIAL_TRUST
|
||||
new ReflectionPermission(PermissionState.Unrestricted).Assert();
|
||||
#endif
|
||||
@@ -300,7 +301,10 @@ namespace Infrastructure
|
||||
Type type;
|
||||
if (!classes.TryGetValue(signature, out type)) {
|
||||
type = CreateDynamicClass(signature.properties);
|
||||
classes.Add(signature, type);
|
||||
//fixed by https://gitee.com/DUWENINK
|
||||
if (!classes.ContainsKey(signature)){
|
||||
classes.Add(signature, type);
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user