Skip to content

Commit 7d085b1

Browse files
committed
# This is a combination of 2 commits.
# This is the 1st commit message: NH-3807 - Took care of most of the GetTypeInfo() needs. Added TypeReflectionExtensions for CoreClr use. # The commit message #2 will be skipped: # fixup! NH-3807 - Took care of most of the GetTypeInfo() needs. Added TypeReflectionExtensions for CoreClr use.
1 parent d645630 commit 7d085b1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/NHibernate/Bytecode/EmitUtil.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public static System.Type DefineDelegateType(
179179
methodBuilder.SetImplementationFlags(
180180
MethodImplAttributes.Runtime | MethodImplAttributes.Managed);
181181

182-
return delegateBuilder.CreateType();
182+
return delegateBuilder.CreateTypeInfo().AsType();
183183
}
184184

185185
public static void EmitLoadType(ILGenerator il, System.Type type)

src/NHibernate/NHibernate.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
4343
<IntermediateOutputPath>obj\Debug-2.0\</IntermediateOutputPath>
4444
<DefineConstants>NET_4_0,FEATURE_SERIALIZATION,FEATURE_LEGACY_REFLECTION_API</DefineConstants>
45+
<DefineConstants>NET_4_0,FEATURE_ADONET_SQLCOMMANDSET,FEATURE_APPDOMAIN,FEATURE_ASSEMBLYBUILDER_SAVE,FEATURE_BINDINGLIST,FEATURE_CODEDOM,FEATURE_DATA_CLOSE,FEATURE_DATA_GETSCHEMATABLE,FEATURE_DBPROVIDERFACTORIES,FEATURE_ODBC_OLEDB,FEATURE_REFLECTEDTYPE,FEATURE_REMOTING,FEATURE_SECURITY_PERMISSIONS,FEATURE_SERIALIZATION,FEATURE_STRING_INTERN,FEATURE_SYSTEM_CONFIGURATION,FEATURE_SYSTEM_SERVICEMODEL,FEATURE_SYSTEM_TRANSACTIONS,FEATURE_WEB_SESSION_CONTEXT,FEATURE_XML_SCHEMAS,FEATURE_XML_VALIDATIONEVENTHANDLER</DefineConstants>
4546
<ErrorReport>prompt</ErrorReport>
4647
<WarningLevel>4</WarningLevel>
4748
<DocumentationFile>bin\Debug-2.0\NHibernate.XML</DocumentationFile>
@@ -153,12 +154,11 @@
153154
<Compile Include="Collection\Generic\SetHelpers\ISetSnapshot.cs" />
154155
<Compile Include="Collection\Generic\SetHelpers\SetSnapShot.cs" />
155156
<Compile Include="Compat\CustomAttributeExtensions.cs" />
157+
<Compile Include="Compat\AppContext.cs" />
156158
<Compile Include="Compat\DesignerCategoryAttribute.cs" />
157159
<Compile Include="Compat\ICloneable.cs" />
158-
<Compile Include="Compat\IntrospectionExtensions.cs" />
159160
<Compile Include="Compat\InvalidExpressionException.cs" />
160161
<Compile Include="Compat\NonSerializedAttribute.cs" />
161-
<Compile Include="Compat\RuntimeReflectionExtensions.cs" />
162162
<Compile Include="Compat\SerializableAttribute.cs" />
163163
<Compile Include="Compat\TypeReflectionExtensions.cs" />
164164
<Compile Include="Connection\ConnectionProvider.cs" />

src/NHibernate/Proxy/DynamicProxy/ProxyFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ private System.Type CreateUncachedProxyType(System.Type baseType, System.Type[]
158158
// Make the proxy serializable
159159
AddSerializationSupport(baseType, baseInterfaces, typeBuilder, interceptorField, defaultConstructor);
160160
#endif
161-
System.Type proxyType = typeBuilder.CreateType();
161+
162+
System.Type proxyType = typeBuilder.CreateTypeInfo().AsType();
162163

163164
ProxyAssemblyBuilder.Save(assemblyBuilder);
164165
return proxyType;

0 commit comments

Comments
 (0)