Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IAdvisor.IsPerInstance Property

Is this advice associated with a particular instance?

[Visual Basic]
Public MustOverride ReadOnly Property IsPerInstance() As Boolean
   Public Get
   End Get
End Property
[C#]
public bool IsPerInstance { public get; }

Property Value

true if this advice is associated with a particular instance.

Remarks

An advisor that was creating a mixin would be a per instance operation and would thus return true. If the advisor is not per instance, it is shared with all instances of the advised class obtained from the same Spring.NET IoC container.

Use singleton and prototype object definitions or appropriate programmatic proxy creation to ensure that IAdvisors have the correct lifecycle model.

Note    This method is not currently used by the framework.

See Also

IAdvisor Interface | Spring.Aop Namespace