Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which layer is the best to add a new method?
Message
De
14/05/2015 03:49:53
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01619738
Message ID:
01619769
Vues:
32
>It didn't, of course, resolve the problem of the thread as how to use one generic method of updating properties that may exist only for some classes. I will look closer at your suggestion and also try to discuss this problem in our group.

https://msdn.microsoft.com/en-us/library/vstudio/ms173173%28v=vs.100%29.aspx
https://msdn.microsoft.com/en-us/library/vstudio/98dc08ac%28v=vs.100%29.aspx
http://joeduffyblog.com/2010/02/09/extension-methods-as-default-interface-method-implementations/

seems in the "default method area" java is actually ahead of C#. From the limited fooling around I have to say that adding mixin/behavioural multiple inheritance in Java for me now feels even better than the implementation in Python, as the compiler error on duplicate default method names in Java really helps by turning the spotlight to potential problem. Those few edge cases probably are better served by asking for a definite impementation and not fall back on the definition order.

Easiest coding would be to enhance your OperatorSession static class with methods, but calling them might be considered a tightly coupled dependency, which clearly is an antipattern from architectural POV.

Pick your poison ;-))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform