public EsStateBuilder() { _esState = new EsState(); _esState.Documents = new string[0]; _esState.Mapping = ""; _esState.Query = ""; _esState.StateUrl = Guid.Empty; }
public async Task <EsfStateResponseDto> Get() { EsState newState = await _newEsfStateFactory.GetNewState(); var esfState = _mapper.Map <EsState, ExistingEsfStateDto>(newState); return(new EsfStateResponseDto { EsfState = esfState }); }
public async Task <EsfStateResponseDto> Get(string stateUrl) { Guid parsedStateUrl = Guid.Parse(stateUrl); EsState storedState = await _esStatesRepository.FindEsState((state) => state.StateUrl == parsedStateUrl); var newState = _mapper.Map <EsState, ExistingEsfStateDto>(storedState); return(new EsfStateResponseDto { EsfState = newState }); }
public static ExistingEsfStateDto FromExisting(EsState esState) { return(new ExistingEsfStateDto() { StateUrl = esState.StateUrl.ToString(), State = new EsfStateDto() { Documents = esState.Documents, Mapping = esState.Mapping, Query = esState.Query } }); }