/// <summary> /// This constructor creates an instance and takes over the context of another controller. /// </summary> /// <param name="controller">The controller object from which the context is taken.</param> protected ControllerObject(ControllerObject controller) { if (controller == null) { throw new ArgumentNullException(nameof(controller)); } Context = controller.Context; contextDispose = false; }
public static IController <Contracts.Persistence.IGenre> CreateGenreController(object sharedController) { if (sharedController == null) { throw new ArgumentNullException(nameof(sharedController)); } Controllers.ControllerObject controller = (Controllers.ControllerObject)sharedController; return(new Controllers.Persistence.GenreController(controller)); }
public static IControllerAccess <Contracts.Persistence.IAlbum> CreateAlbumController(object sharedController) { if (sharedController == null) { throw new ArgumentNullException(nameof(sharedController)); } Controllers.ControllerObject controller = (Controllers.ControllerObject)sharedController; return(new Controllers.Persistence.AlbumController(controller)); }
protected GenericController(ControllerObject controllerObject) : base(controllerObject) { }