With the background of recent traffic - Leo Simmons initiative, a old post
from Berin, last RT from Aaron and some nice chatting with Steve - I'd like
ask to implement supporting for all IoC levels in Avalon#. Of course obeying
Avalon semantics and not write in the stone how a user should code his
component.
In this form we can ending have these types of component code:
Level 1:
[AvalonComponent("MyComponent", Lifestyle.Transient)]
[AvalonService( typeof(IMyService) )]
[AvalonLogger( "component.logger" )]
[AvalonDependency( typeof(IMyRequestedService) )]
public class MyComponent : IMyService, ILookupEnabled
{
public MyComponent()
{
}
public void EnableLookup( ILookupManager manager )
{
// Dependencies are here
}
}
OR
Level 2:
[AvalonComponent("MyComponent", Lifestyle.Transient)]
[AvalonService( typeof(IMyService) )]
[AvalonLogger( "component.logger" )]
public class MyComponent : IMyService
{
public MyComponent()
{
}
[AvalonDependency( typeof(IMyRequestedService) )]
public IMyRequestedService Service
{
get
{
}
set
{
}
}
}
OR
Level 3:
[AvalonComponent("MyComponent", Lifestyle.Transient)]
[AvalonService( typeof(IMyService) )]
[AvalonLogger( "component.logger" )]
public class MyComponent : IMyService
{
[AvalonDependency( typeof(IMyRequestedService) )]
public MyComponent( IMyRequestedService service )
{
}
}
It is VERY easy to get it done and with pratic results - thanks Steve/Berin
for the idea.
Comments?
regards,
hammett
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]