コード例 #1
0
        /// <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;
        }
コード例 #2
0
ファイル: Factory.cs プロジェクト: ceisserer/MusicStore
        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));
        }
コード例 #3
0
ファイル: Factory.cs プロジェクト: leoggehrer/MusicStore
        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));
        }
コード例 #4
0
 protected GenericController(ControllerObject controllerObject)
     : base(controllerObject)
 {
 }