feat!: GetRequiredBehaviour/HierarchyObject methods added for cleaner null handling
This commit is contained in:
@@ -14,10 +14,10 @@ public class BehaviourControllerFactory
|
||||
T behaviourController = TypeFactory.Get<T>(args);
|
||||
|
||||
if (!hierarchyObject.Assign(behaviourController))
|
||||
throw AssignException.From(hierarchyObject, behaviourController);
|
||||
throw AssignFailedException.From(hierarchyObject, behaviourController);
|
||||
|
||||
if (!behaviourController.Assign(hierarchyObject))
|
||||
throw AssignException.From(behaviourController, hierarchyObject);
|
||||
throw AssignFailedException.From(behaviourController, hierarchyObject);
|
||||
|
||||
return behaviourController;
|
||||
}
|
||||
|
Reference in New Issue
Block a user