throws exception if the delegate is already set

This commit is contained in:
Shannon
2016-11-25 15:55:33 +01:00
parent 0e61d18b9e
commit 14bf4bbd32

View File

@@ -73,6 +73,8 @@ namespace Umbraco.Core.ObjectResolution
{
if (_resolved)
throw new InvalidOperationException("Cannot set the FilterCollection delegate once the ApplicationEventHandlers are resolved");
if (_filterCollection != null)
throw new InvalidOperationException("Cannot set the FilterCollection delegate once it's already been specified");
_filterCollection = value;
}