
dataobjectsdotnet - issue #573
Refactor Domain.Services, Session.Services and SessionBound.ProtectedServices (currently CoreServices)
These types must be based on the same class (ServiceCollection) allowing to: - Serve the instances passed to its constructor (PersistentAccessor, etc.) - If a particular T can't be served, pass control to the delegate or virtual method ("no service" handler).
This "no service" handler will: 1) In case of Domain.Services: - if T is registered protected session service, it must create or return an existing instance it - we must think about IoC container usage here. 2) In case of ProtectedServices: - ask SessionHandler to resolve T. It will do this by using its own ServiceCollection as well. - if T is registered protected session service, it will try to instantiate it using the same was as Domain.Services. 3) In case of Session.Services: - if T is registered non-protected session service, it will try to instantiate it using the same was as Domain.Services.
Likely, we must add [Service(bool Protected, bool Singleton)] attribute.
Properties like ProtectedServices.PersistentAccessor must be implemented as shortcuts using Get<T>() there.
Comment #1
Posted on Jan 12, 2010 by Helpful PandaThe ideas behind: - Usage of IoC containers & configuration must be optional - Convention over configuration (just register the assembly).
Comment #2
Posted on Feb 7, 2010 by Helpful PandaDone. The description will follow up in Manual shortly.
Comment #3
Posted on Feb 7, 2010 by Helpful PandaBtw, now all the built-in services are locates in special namespace: - http://goo.gl/W9ux
Status: Done
Labels:
Type-Refactoring
Priority-Critical
Milestone-Release4.1
Component-Storage