Example #1
0
        public TwitterList(ITwitterListDTO twitterListDTO, ITwitterClient client)
        {
            // ! order is important, client should be at the top so that `UpdateOwner`
            // can use the client factories to create the owner user.
            Client = client;

            _twitterListDTO = twitterListDTO;
            UpdateOwner();
        }
        public ITwitterList CreateTwitterList(ITwitterListDTO twitterListDTO)
        {
            if (twitterListDTO == null)
            {
                return(null);
            }

            return(new TwitterList(twitterListDTO, _client));
        }
        // Generate List from DTO
        public ITwitterList CreateListFromDTO(ITwitterListDTO twitterListDTO)
        {
            if (twitterListDTO == null)
            {
                return null;
            }

            var parameterOverride = _twitterListFactory.GenerateParameterOverrideWrapper("twitterListDTO", twitterListDTO);
            return _twitterListFactory.Create(parameterOverride);
        }
        // Generate List from DTO
        public ITwitterList CreateListFromDTO(ITwitterListDTO twitterListDTO)
        {
            if (twitterListDTO == null)
            {
                return(null);
            }

            var parameterOverride = _twitterListFactory.GenerateParameterOverrideWrapper("twitterListDTO", twitterListDTO);

            return(_twitterListFactory.Create(parameterOverride));
        }
Example #5
0
 public TwitterList(
     IUserFactory userFactory,
     ITwitterListController twitterListController,
     ITwitterListDTO twitterListDTO,
     ITaskFactory taskFactory)
 {
     _userFactory = userFactory;
     _twitterListController = twitterListController;
     _taskFactory = taskFactory;
     TwitterListDTO = twitterListDTO;
 }
Example #6
0
 public TwitterList(
     IUserFactory userFactory,
     ITwitterListController twitterListController,
     ITwitterListDTO twitterListDTO,
     ITaskFactory taskFactory)
 {
     _userFactory           = userFactory;
     _twitterListController = twitterListController;
     _taskFactory           = taskFactory;
     TwitterListDTO         = twitterListDTO;
 }
Example #7
0
        public bool Update(ITwitterListUpdateParameters parameters)
        {
            var updateList = _twitterListController.UpdateList(this, parameters);

            if (updateList != null)
            {
                _twitterListDTO = updateList.TwitterListDTO;
                return(true);
            }

            return(false);
        }
Example #8
0
        public bool Update(ITwitterListUpdateParameters parameters)
        {
            var updateList = _twitterListController.UpdateList(this, parameters);

            if (updateList != null)
            {
                _twitterListDTO = updateList.TwitterListDTO;
                return true;
            }

            return false;
        }