public IWindow ResolveWindow() { ConnectionProperties connectionProperties = new ConnectionProperties(); RestClient restClient = new RestClient(connectionProperties); ConverterJson converterJson = new ConverterJson(); IUserDao userDao = new UserDao(restClient, converterJson); IPlayerDao playerDao = new PlayerDao(restClient, converterJson); IFactionDao factionDao = new FactionDao(restClient, converterJson); IFactionPlayerDao factionPlayerDao = new FactionPlayerDao(restClient, converterJson); //Mapper mapper = new Mapper(); Converter <Player, PlayerDto> playerConverter = new PlayerConverter(); IUserService userService = new UserService(userDao); IPlayerService playerService = new PlayerService(playerDao); IFactionService factionService = new FactionService(factionDao); IFactionPlayerService factionPlayerService = new FactionPlayerService(factionPlayerDao); IVMFacade vmFacade = new VMFacade(factionPlayerService, factionService, playerService); IPlayerVmFacade playerVmFacade = new PlayerVmFacade(factionPlayerService, factionService, playerService); IFactionVmFacade factionVmFacade = new FactionVmFacade(factionPlayerService, factionService, playerService); IUserViewModel userViewModel = new UserViewModel(vmFacade, userService); IPlayerViewModel playerViewModel = new PlayerViewModel(playerVmFacade); IFactionViewModel factionViewModel = new FactionViewModel(factionVmFacade); IMainViewModel mainViewModel = new MainViewModel(connectionProperties, playerViewModel, factionViewModel, userViewModel); ViewModelFactory vmFactory = new ViewModelFactory(mainViewModel); Window main = new Main(); _window = new MainWindowAdapter(main, vmFactory); //vmFactory.CreatePlayerVM(_window); return(_window); }
public void Save(IList <TEntity> obj) { _db.Set <TEntity>().AddRange(obj); foreach (var o in obj) { GravaLog(new LogEntidade(null, ConverterJson.ObjetoParaJson(o), null, typeof(TEntity).Name, EAcao.Inserido)); } }
public UserDao(RestClient restClient, ConverterJson converterJson) { _restClient = restClient; _converterJson = converterJson; }
public static void SendNewItemVendor(ItemVendor item) { SendPlayer s = new SendPlayer(new Send()); ConverterJson conv = new ConverterJson(); string jSon = conv.ConvertTOJson(item); s.SendPlayerNewItemVendor(jSon); }
public static void AtualizaEstoqueID(long IdChar) { Util.WriteLog("Inicio da Atualização de Estoque"); List<ItemUnitChar> l = CharacterFactory.GetItensChar(StyxWoW.Me, Convert.ToInt64(IdChar)); SendPlayer s = new SendPlayer(new Send()); ConverterJson conv = new ConverterJson(); string jSon = conv.ConvertTOJson(l); s.SendItensPlayer(jSon); Util.WriteLog("Final da Atualização de Estoque"); }
public static void AtualizaEstoqueGuildID(string nameGuild, long idGuild) { try { SendGuild sGuild = new SendGuild(new Send()); ConverterJson conv = new ConverterJson(); List<ItemUnitGuild> itensGuild = GuildFactory.GetInstanceGuild(nameGuild, idGuild); string itens = conv.ConvertTOJson(itensGuild); sGuild.SendGuildItens(itens); } catch (AggregateException aex) { aex.Handle((ex) => { return true; }); } catch (Exception ex) { Util.WriteLog(ex.Message); } }
//private readonly RestClient _restClient; //private readonly ConverterJson _converterJson; public ExamplePlayerDao(RestClient restClient, ConverterJson converterJson) : base(restClient, converterJson) { }
public GenericDao(RestClient restClient, ConverterJson converterJson) { _restClient = restClient; _converterJson = converterJson; }
public FactionDao(RestClient restClient, ConverterJson converterJson) { _restClient = restClient; _converterJson = converterJson; }
public PlayerDao(RestClient restClient, ConverterJson converterJson) : base(restClient, converterJson) { _restClient = restClient; _converterJson = converterJson; }