Skip to content

Commit 83d438c

Browse files
ngbrownfredericDelaporte
authored andcommitted
NH-3700 - Remove CodeDom BytecodeProviderImpl (#689)
* 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 d92da29 commit 83d438c

File tree

7 files changed

+5
-277
lines changed

7 files changed

+5
-277
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
@@ -40,7 +40,7 @@ public void IgnoreSystemOutOfAppConfig()
4040
string xml =
4141
@"<?xml version='1.0' encoding='utf-8' ?>
4242
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'>
43-
<bytecode-provider type='codedom'/>
43+
<bytecode-provider type='lcg'/>
4444
<reflection-optimizer use='false'/>
4545
<session-factory name='MyFactoryName'>
4646
</session-factory>
@@ -59,7 +59,7 @@ public void EmptyFactoryNotAllowed()
5959
string xml =
6060
@"<?xml version='1.0' encoding='utf-8' ?>
6161
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'>
62-
<bytecode-provider type='codedom'/>
62+
<bytecode-provider type='lcg'/>
6363
</hibernate-configuration>";
6464

6565
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
@@ -370,8 +370,6 @@ private static IBytecodeProvider BuildBytecodeProvider(string providerName)
370370
{
371371
switch (providerName)
372372
{
373-
case "codedom":
374-
return new Bytecode.CodeDom.BytecodeProviderImpl();
375373
case "lcg":
376374
return new Bytecode.Lightweight.BytecodeProviderImpl();
377375
case "null":

src/NHibernate/nhibernate-configuration.xsd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
<xs:element ref="bytecode-provider" minOccurs="0" maxOccurs="1" >
1414
<xs:annotation>
1515
<xs:documentation>
16-
There are 3 default short-cut values
16+
There are 2 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.
@@ -257,7 +256,6 @@
257256
<xs:attribute name="type" default="lcg">
258257
<xs:simpleType>
259258
<xs:restriction base="xs:string">
260-
<xs:enumeration value="codedom" />
261259
<xs:enumeration value="lcg" />
262260
<xs:enumeration value="null" />
263261
</xs:restriction>

0 commit comments

Comments
 (0)