Skip to content

Commit ceeb7e5

Browse files
committed
NH-3700 - Remove CodeDom BytecodeProviderImpl
The CodeDom BytecodeProviderImpl was intended for .Net 1.1 and has not been the default for many years. It doesn't actually work currently.
1 parent fd78581 commit ceeb7e5

File tree

7 files changed

+4
-276
lines changed

7 files changed

+4
-276
lines changed

src/NHibernate.DomainModel/NHSpecific/GetSetHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace NHibernate.DomainModel.NHSpecific
44
{
55
/// <summary>
6-
/// Test the ability of CodeDOM bytecode provider to generate code that
6+
/// Test the ability of bytecode provider to generate code that
77
/// can set a value type from a null.
88
/// </summary>
99
public class GetSetHelper
@@ -104,4 +104,4 @@ public int ID
104104

105105
#endregion
106106
}
107-
}
107+
}

src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void IgnoreSystemOutOfAppConfig()
5151
string xml =
5252
@"<?xml version='1.0' encoding='utf-8' ?>
5353
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'>
54-
<bytecode-provider type='codedom'/>
54+
<bytecode-provider type='lcg'/>
5555
<reflection-optimizer use='false'/>
5656
<session-factory name='MyFactoryName'>
5757
</session-factory>
@@ -70,7 +70,7 @@ public void EmptyFactoryNotAllowed()
7070
string xml =
7171
@"<?xml version='1.0' encoding='utf-8' ?>
7272
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'>
73-
<bytecode-provider type='codedom'/>
73+
<bytecode-provider type='lcg'/>
7474
</hibernate-configuration>";
7575

7676
XmlTextReader xtr = new XmlTextReader(xml, XmlNodeType.Document, null);

src/NHibernate/Bytecode/CodeDom/BytecodeProviderImpl.cs

Lines changed: 0 additions & 264 deletions
This file was deleted.

src/NHibernate/Cfg/ConfigurationSchema/CfgXmlHelper.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ internal static string ToConfigurationString(this BytecodeProviderType source)
6868
{
6969
switch (source)
7070
{
71-
case BytecodeProviderType.Codedom:
72-
return "codedom";
7371
case BytecodeProviderType.Lcg:
7472
return "lcg";
7573
default:

src/NHibernate/Cfg/ConfigurationSchema/HibernateConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ namespace NHibernate.Cfg.ConfigurationSchema
1010
/// </summary>
1111
public enum BytecodeProviderType
1212
{
13-
/// <summary>Xml value: codedom</summary>
14-
Codedom,
1513
/// <summary>Xml value: lcg</summary>
1614
Lcg,
1715
/// <summary>Xml value: null</summary>

src/NHibernate/Cfg/Environment.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ private static IBytecodeProvider BuildBytecodeProvider(string providerName)
357357
{
358358
switch (providerName)
359359
{
360-
case "codedom":
361-
return new Bytecode.CodeDom.BytecodeProviderImpl();
362360
case "lcg":
363361
return new Bytecode.Lightweight.BytecodeProviderImpl();
364362
case "null":

src/NHibernate/nhibernate-configuration.xsd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<xs:documentation>
1616
There are 3 default short-cut values
1717
- lcg : default for .NET2.0 and higher.
18-
- codedom : CodeDOM-based bytecode provider (mostly for .NET1.1).
1918
- null : Disable the reflection optimization completely.
2019
In addition you can specify the AssemblyQualifiedName of your custom bytecode-provider (implementation of IBytecodeProvider).
2120
Note: the bytecode-provider will be effective only when specified in the app.config or web.config.
@@ -216,7 +215,6 @@
216215
<xs:attribute name="type" default="lcg">
217216
<xs:simpleType>
218217
<xs:restriction base="xs:string">
219-
<xs:enumeration value="codedom" />
220218
<xs:enumeration value="lcg" />
221219
<xs:enumeration value="null" />
222220
</xs:restriction>

0 commit comments

Comments
 (0)