Initializing T with a proper NullInstance.

This allows for easier testing where client code will not inject T (which would cause null reference exceptions down the line).
This commit is contained in:
Sipke Schoorstra
2014-11-22 17:09:10 -08:00
parent b492a5676a
commit f79e0462c0

View File

@@ -6,6 +6,10 @@ using Orchard.Workflows.Services;
namespace Orchard.Users.Activities {
public abstract class UserActivity : Event {
protected UserActivity() {
T = NullLocalizer.Instance;
}
public Localizer T { get; set; }
public override bool CanStartWorkflow {