private void StoreState()
        {
            StorableMaintenanceState storableState = new StorableMaintenanceState
            {
                ExpirationDate  = _state.ExpirationDate,
                IsMaintenanceOn = _state.IsMaintenanceOn
            };

            IMiddlewareOptionsContainer optionsContainer = _state;

            storableState.MiddlewareOptions = optionsContainer.MiddlewareOptions
                                              ?.GetAll <ISerializableOption>()
                                              .Select(o => new StorableOption
            {
                StringValue = o.GetStringValue(),
                TypeName    = o.TypeName
            })
                                              .ToList();

            _stateStore.SetState(storableState);
        }