/// <exception cref="ArgumentNullException"><paramref name="viewData"/> or
      /// <paramref name="viewModelParams"/> is <see langword="null" />.</exception>
      /// <exception cref="InvalidOperationException">attempt to assign value to the existing <paramref name="viewData"/> key</exception>
      public static void SetControllableViewModelParams(this ViewDataDictionary viewData,
         IControllableViewModelParams viewModelParams)
      {
         if (viewData == null)
            throw new ArgumentNullException("viewData");

         if (viewModelParams == null)
            throw new ArgumentNullException("viewModelParams");

         if (viewData.ContainsKey(ControllableViewModelParamsViewDataKey))
            throw new InvalidOperationException("attempt to assign value to the existing viewDataDictionary key");

         viewData[ControllableViewModelParamsViewDataKey] = viewModelParams;
      }
        /// <exception cref="ArgumentNullException"><paramref name="viewData"/> or
        /// <paramref name="viewModelParams"/> is <see langword="null" />.</exception>
        /// <exception cref="InvalidOperationException">attempt to assign value to the existing <paramref name="viewData"/> key</exception>
        public static void SetControllableViewModelParams(this ViewDataDictionary viewData,
                                                          IControllableViewModelParams viewModelParams)
        {
            if (viewData == null)
            {
                throw new ArgumentNullException("viewData");
            }

            if (viewModelParams == null)
            {
                throw new ArgumentNullException("viewModelParams");
            }

            if (viewData.ContainsKey(ControllableViewModelParamsViewDataKey))
            {
                throw new InvalidOperationException("attempt to assign value to the existing viewDataDictionary key");
            }

            viewData[ControllableViewModelParamsViewDataKey] = viewModelParams;
        }
 protected abstract TSortStateModel CreateSortStateModel(IControllableViewModelParams controlParams);
 /// <exception cref="ArgumentNullException"><paramref name="viewModelParams" /> or
 /// <paramref name="defaultPageSize" /> or
 /// <paramref name="sizeList" /> is <see langword="null" />.</exception>
 protected ControllableViewModel(IControllableViewModelParams viewModelParams, string defaultPageSize, params string[] sizeList)
     : base(viewModelParams, defaultPageSize, sizeList)
 {
 }
 /// <exception cref="ArgumentNullException"><paramref name="viewModelParams" /> is <see langword="null" />.</exception>
 protected ControllableViewModel(IControllableViewModelParams viewModelParams, string defaultPageSize = "10")
     : base(viewModelParams, defaultPageSize)
 {
 }
 protected override UserSortStateModel CreateSortStateModel(IControllableViewModelParams controlParams)
 {
     return(UserSortStateModel.Create(controlParams.SortKey));
 }
 public IndexControllableViewModel(IControllableViewModelParams viewModelParams, string defaultPageSize,
                                   params string[] sizeList)
     : base(viewModelParams, defaultPageSize, sizeList)
 {
     SearchBoxTextPlaceholder = "Search by Nickname";
 }
 public IndexControllableViewModel(IControllableViewModelParams viewModelParams, string defaultPageSize = "10")
     : base(viewModelParams, defaultPageSize)
 {
     SearchBoxTextPlaceholder = "Search by Nickname";
 }
            protected override IndexSortStateModel CreateSortStateModel(IControllableViewModelParams controlParams)
            {
                var sortStateModel = IndexSortStateModel.Create(controlParams.SortKey);

                return(sortStateModel);
            }