From 2228209f2e08be4c15871a3df2da8c8aaf5f0516 Mon Sep 17 00:00:00 2001 From: eeichinger Date: Sun, 10 May 2009 16:02:17 +0000 Subject: [PATCH] removed obsolete factory method generation --- .../ServicedComponentExporter.cs | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs index c7c35e6c..f76b025c 100644 --- a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs +++ b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs @@ -256,21 +256,20 @@ namespace Spring.EnterpriseServices il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Call, builder.BaseType.GetConstructor(Type.EmptyTypes)); il.Emit(OpCodes.Ret); - - ImplementFactoryMethod(builder, cb); } - protected void ImplementFactoryMethod(TypeBuilder builder, ConstructorBuilder cb) - { - base.ImplementCustom(builder); - TypeBuilder factory = builder.DefineNestedType("Factory", System.Reflection.TypeAttributes.NestedPublic); - MethodBuilder newMethod = factory.DefineMethod("New", MethodAttributes.Public | MethodAttributes.Static|MethodAttributes.HideBySig, - CallingConventions.Standard, builder, new Type[0]); - ILGenerator il = newMethod.GetILGenerator(); - il.Emit(OpCodes.Newobj, cb); - il.Emit(OpCodes.Ret); - factory.CreateType(); - } +// TODO:remove +// protected void ImplementFactoryMethod(TypeBuilder builder, ConstructorBuilder cb) +// { +// base.ImplementCustom(builder); +// TypeBuilder factory = builder.DefineNestedType("Factory", System.Reflection.TypeAttributes.NestedPublic); +// MethodBuilder newMethod = factory.DefineMethod("New", MethodAttributes.Public | MethodAttributes.Static|MethodAttributes.HideBySig, +// CallingConventions.Standard, builder, new Type[0]); +// ILGenerator il = newMethod.GetILGenerator(); +// il.Emit(OpCodes.Newobj, cb); +// il.Emit(OpCodes.Ret); +// factory.CreateType(); +// } protected override IProxyMethodBuilder CreateTargetProxyMethodBuilder(TypeBuilder typeBuilder) {