Skip to content

NH-3700 - Remove CodeDom BytecodeProviderImpl #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/NHibernate.DomainModel/NHSpecific/GetSetHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NHibernate.DomainModel.NHSpecific
{
/// <summary>
/// Test the ability of CodeDOM bytecode provider to generate code that
/// Test the ability of bytecode provider to generate code that
/// can set a value type from a null.
/// </summary>
public class GetSetHelper
Expand Down Expand Up @@ -104,4 +104,4 @@ public int ID

#endregion
}
}
}
4 changes: 2 additions & 2 deletions src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void IgnoreSystemOutOfAppConfig()
string xml =
@"<?xml version='1.0' encoding='utf-8' ?>
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'>
<bytecode-provider type='codedom'/>
<bytecode-provider type='lcg'/>
<reflection-optimizer use='false'/>
<session-factory name='MyFactoryName'>
</session-factory>
Expand All @@ -59,7 +59,7 @@ public void EmptyFactoryNotAllowed()
string xml =
@"<?xml version='1.0' encoding='utf-8' ?>
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'>
<bytecode-provider type='codedom'/>
<bytecode-provider type='lcg'/>
</hibernate-configuration>";

XmlTextReader xtr = new XmlTextReader(xml, XmlNodeType.Document, null);
Expand Down
264 changes: 0 additions & 264 deletions src/NHibernate/Bytecode/CodeDom/BytecodeProviderImpl.cs

This file was deleted.

2 changes: 0 additions & 2 deletions src/NHibernate/Cfg/ConfigurationSchema/CfgXmlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ internal static string ToConfigurationString(this BytecodeProviderType source)
{
switch (source)
{
case BytecodeProviderType.Codedom:
return "codedom";
case BytecodeProviderType.Lcg:
return "lcg";
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ namespace NHibernate.Cfg.ConfigurationSchema
/// </summary>
public enum BytecodeProviderType
{
/// <summary>Xml value: codedom</summary>
Codedom,
/// <summary>Xml value: lcg</summary>
Lcg,
/// <summary>Xml value: null</summary>
Expand Down
2 changes: 0 additions & 2 deletions src/NHibernate/Cfg/Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,6 @@ private static IBytecodeProvider BuildBytecodeProvider(string providerName)
{
switch (providerName)
{
case "codedom":
return new Bytecode.CodeDom.BytecodeProviderImpl();
case "lcg":
return new Bytecode.Lightweight.BytecodeProviderImpl();
case "null":
Expand Down
4 changes: 1 addition & 3 deletions src/NHibernate/nhibernate-configuration.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
<xs:element ref="bytecode-provider" minOccurs="0" maxOccurs="1" >
<xs:annotation>
<xs:documentation>
There are 3 default short-cut values
There are 2 default short-cut values
- lcg : default for .NET2.0 and higher.
- codedom : CodeDOM-based bytecode provider (mostly for .NET1.1).
- null : Disable the reflection optimization completely.
In addition you can specify the AssemblyQualifiedName of your custom bytecode-provider (implementation of IBytecodeProvider).
Note: the bytecode-provider will be effective only when specified in the app.config or web.config.
Expand Down Expand Up @@ -257,7 +256,6 @@
<xs:attribute name="type" default="lcg">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="codedom" />
<xs:enumeration value="lcg" />
<xs:enumeration value="null" />
</xs:restriction>
Expand Down