Jonathan Pryor condannĂ²:

> Exactly. So it looks like a feature without a purpose. Kill it.

Gzipped patch attached.

---
 src/DbMetal/Generator/GenerationContext.cs         |    2 +-
 .../CodeTextGenerator/CodeGenerator.Class.cs       |    2 +-
 src/DbMetal/Parameters.cs                          |    9 ++-------
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/DbMetal/Generator/GenerationContext.cs 
b/src/DbMetal/Generator/GenerationContext.cs
index 90d24c5..7a4c545 100644
--- a/src/DbMetal/Generator/GenerationContext.cs
+++ b/src/DbMetal/Generator/GenerationContext.cs
@@ -98,7 +98,7 @@ namespace DbMetal.Generator
         {
             foreach (IImplementation implementation in AllImplementations)
             {
-                if (Array.Exists(Parameters.EntityImplementedInterfaces, 
interfaceName => implementation.InterfaceName == interfaceName))
+                if (Array.Exists(Parameters.EntityInterfaces, interfaceName => 
implementation.InterfaceName == interfaceName))
                     yield return implementation;
             }
         }
diff --git 
a/src/DbMetal/Generator/Implementation/CodeTextGenerator/CodeGenerator.Class.cs 
b/src/DbMetal/Generator/Implementation/CodeTextGenerator/CodeGenerator.Class.cs
index a822130..f09a35c 100644
--- 
a/src/DbMetal/Generator/Implementation/CodeTextGenerator/CodeGenerator.Class.cs
+++ 
b/src/DbMetal/Generator/Implementation/CodeTextGenerator/CodeGenerator.Class.cs
@@ -80,7 +80,7 @@ namespace DbMetal.Generator.Implementation.CodeTextGenerator
             using (WriteAttributes(writer, GetAttributeNames(context, 
context.Parameters.EntityExposedAttributes)))
             using (writer.WriteAttribute(tableAttribute))
             using (writer.WriteClass(specifications,
-                                     table.Type.Name, entityBase, 
context.Parameters.EntityImplementedInterfaces))
+                                     table.Type.Name, entityBase, 
context.Parameters.EntityInterfaces))
             {
                 WriteClassHeader(writer, table, context);
                 WriteCustomTypes(writer, table, schema, context);
diff --git a/src/DbMetal/Parameters.cs b/src/DbMetal/Parameters.cs
index d5d9dc0..1b4845e 100644
--- a/src/DbMetal/Parameters.cs
+++ b/src/DbMetal/Parameters.cs
@@ -130,8 +130,7 @@ namespace DbMetal
         /// <summary>
         /// Interfaces to be implemented
         /// </summary>
-        public string EntityInterfaces { get; set; }
-        public string[] EntityImplementedInterfaces { get { return 
GetArray(EntityInterfaces); } }
+        public string[] EntityInterfaces { get; set; }
 
         /// <summary>
         /// Extra attributes to be implemented by class
@@ -229,7 +228,7 @@ namespace DbMetal
             Culture = "en";
             GenerateTypes = new List<string>();
             GenerateTimestamps = true;
-            EntityInterfaces = 
"INotifyPropertyChanging,INotifyPropertyChanged";//INotifyPropertyChanging 
INotifyPropertyChanged IModified
+            EntityInterfaces = new []{ "INotifyPropertyChanging", 
"INotifyPropertyChanged" };
         }
 
         /// <summary>
@@ -299,10 +298,6 @@ namespace DbMetal
                   "Base {TYPE} of entity classes in the generated code "
                   +"(default: entities have no base class).",
                   type => EntityBase = type },
-                { "entityInterfaces=",
-                  "Comma separated base {INTERFACE(S)} of entity classes in 
the "
-                  +"generated code (default: entities implement 
INotifyPropertyChanging, INotifyPropertyChanged).",
-                  interfaces => EntityInterfaces = interfaces },
                 { "entityAttributes=",
                   "Comma separated {ATTRIBUTE(S)} of entity classes in the 
generated code.",
                   attributes => EntityAttributes = attributes },
-- 



-- 
Emanuele Aina
Studio Associato Di Nunzio e Di Gregorio
http://dndg.it/
Via Maria Vittoria, 2
10123 Torino - Italy

--

You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/dblinq?hl=.


Attachment: 0001-Removed-the-entityInterfaces-option-from-DbMetal.patch.gz
Description: GNU Zip compressed data

Reply via email to