protected override void Load(ContainerBuilder moduleBuilder)
        {
            base.Load(moduleBuilder);

            moduleBuilder
                .Register(c =>
                {
                    lock (_lock)
                    {
                        var result = new MemoryContext(
                            c.Resolve<InterfaceType.Factory>(),
                            c.Resolve<Func<IFrozenContext>>(),
                            c.Resolve<MemoryImplementationType.MemoryFactory>()
                            );

                        return result;
                    }
                })
                .As<IReadOnlyZetboxContext>()
                .As<IZetboxContext>()
                .OnActivated(args =>
                {
                    var config = args.Context.Resolve<ZetboxConfig>();
                    var connectionString = config.Server.GetConnectionString(Helper.ZetboxConnectionStringKey);
                    Importer.LoadFromXml(args.Instance, connectionString.ConnectionString);

                    var manager = args.Context.Resolve<IMemoryActionsManager>();
                    manager.Init(args.Instance);
                })
                .InstancePerDependency();
        }
Exemple #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory,
                              MemoryContext memoryContext, UserManager <GameUser> userManager, RoleManager <IdentityRole> roleManager)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();
            var options = new RewriteOptions()
                          .AddRedirectToHttps();

            app.UseRewriter(options);

            if (env.IsDevelopment())
            {
                // app.UseDeveloperExceptionPage();
                app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
                    HotModuleReplacement = true
                });
            }
            app.UseExceptionHandler(appBuilder => {
                appBuilder.Run(async context =>
                {
                    context.Response.StatusCode = 500;
                    await context.Response.WriteAsync("An unexpected error happened: try again later.");
                });
            });
            app.UseStaticFiles();
            app.UseIdentity();
            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");

                routes.MapSpaFallbackRoute(
                    name: "spa-fallback",
                    defaults: new { controller = "Home", action = "Index" });
            });
            // Seed data for testing.
            // if (env.IsDevelopment())
            // {
            //     memoryContext.EnsureSeedDataForContext(userManager, roleManager).Wait();
            // }
        }
Exemple #3
0
        public static List <Categoria> List(Context cx = null)
        {
            var list = MemoryContext.GetCache <List <Categoria> >();

            if (list.Count == 0)
            {
                if (cx == null)
                {
                    cx = new Context();
                }

                list = cx.Query <Categoria>(
                    @"select
                        Cod_Categoria
                       ,Nome 
                    from Categoria").ToList();
                MemoryContext.SetCache <List <Categoria> >(list);
            }
            return(list);
        }
        public ShowServiciosViewModel(MemoryContext memoryContext)
        {
            _memoryContext        = memoryContext;
            CreateServicioCommand = new CreateServicioCommand();
            var repo = new RepositoryInMemoryFactory <Servicio>(_memoryContext).Instance;

            ServiciosList = new ObservableCollection <Servicio>(repo.Find(r => true));

            MessagingCenter.Subscribe <Servicio>(this, MessagingResources.ServicioCreado, (servicio) =>
            {
                ServiciosList.Add(servicio);
            });

            MessagingCenter.Subscribe <Servicio>(this, MessagingResources.ServicioActualizado, (servicio) =>
            {
                var position = ServiciosList.IndexOf(servicio);
                ServiciosList.RemoveAt(position);
                ServiciosList.Insert(position, servicio);
            });
        }
Exemple #5
0
        public IActionResult Edit(
            Guid id, [Bind("ID,Title,ReleaseDate,Genre,Price")] Movie movie)
        {
            var storedMovie = MemoryContext.Movies
                              .FirstOrDefault(m => m.Id == id);

            if (storedMovie == null || storedMovie.Id != movie.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                storedMovie = movie;
                MemoryContext.SaveChanges();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(movie));
        }
Exemple #6
0
        public static List <UsuarioComum> List(int Cod_Comum, Context cx = null)
        {
            var list = MemoryContext.GetCache <List <UsuarioComum> >(Cod_Comum);

            if (list.Count == 0)
            {
                if (cx == null)
                {
                    cx = new Context();
                }

                list = cx.Query <UsuarioComum>(
                    @"select
                        Cod_Usuario
                       ,Cod_Comum 
                    from Usuario
                    where Cod_Comum = @Cod_Comum", new { Cod_Comum }).ToList();
                MemoryContext.SetCache <List <UsuarioComum> >(list, Cod_Comum);
            }
            return(list);
        }
        public static bool TryAddTenant(string tenantId, string signupToken)
        {
            if (!ContainsTenant(tenantId))
            {
                using (var context = MemoryContext.GetContext())
                {
                    SignupToken existingToken = context.SignupTokens.Where(token => token.Id == signupToken).FirstOrDefault();
                    if (existingToken != null)
                    {
                        context.SignupTokens.Remove(existingToken);
                        context.Tenants.Add(new Tenant {
                            Id = tenantId
                        });
                        context.SaveChanges();
                        return(true);
                    }
                }
            }

            return(false);
        }
Exemple #8
0
        private bool IsObjectManagerOnNewFrame(MemoryContext ctx)
        {
            _objectManager = _objectManager ?? ctx.DataSegment.ObjectManager;

            // Don't do anything unless game updated frame.
            int currentFrame = _objectManager.RenderTick;

            if (currentFrame == _previousFrame)
            {
                return(false);
            }

            if (currentFrame < _previousFrame)
            {
                // Lesser frame than before = left game probably.
                Reset();
                return(false);
            }
            _previousFrame = currentFrame;
            return(true);
        }
Exemple #9
0
        public static void Initialize(MemoryContext ctx)
        {
            _snoSlugs = new Dictionary <SNOType, Dictionary <SNO, string> >();
            foreach (SNOType snoType in Enum.GetValues(typeof(SNOType)))
            {
                _snoSlugs.Add(snoType, new Dictionary <SNO, string>());
            }

            var snoDiskEntries = ctx.DataSegment.SNOFiles.SNODiskEntries.ToArray();

            foreach (var item in snoDiskEntries)
            {
                item.TakeSnapshot();
                _snoSlugs[item.SNOType][item.SNO] = item.Slug;
            }

            //var ac = new AllocationCache<MemoryModel.Collections.LinkedListNode<SNODiskEntry>>(ctx, ctx.DataSegment.SNOFiles.SNODiskEntries.Allocator);
            //ac.Update();
            //var nodes = ac.GetItems();
            //var snoSlugs2 = new Dictionary<SNOType, Dictionary<SNO, string>>();
            //foreach (SNOType snoType in Enum.GetValues(typeof(SNOType)))
            //    snoSlugs2.Add(snoType, new Dictionary<SNO, string>());
            //foreach (var node in nodes)
            //{
            //    var v = node.Value;
            //    if (v.SNO == -1 ||
            //        v.SNO == 0)
            //        continue;
            //    snoSlugs2[v.SNOType][v.SNO] = v.Slug;
            //}

            var stringListGroupStorage = ctx.DataSegment.SNOGroupStorage[(int)SNOType.StringList].Cast <SNOGroupStorage <StringList> >().Dereference();

            _powersStringLookup   = GetLookup(stringListGroupStorage, "Powers");
            _monstersStringLookup = GetLookup(stringListGroupStorage, "Monsters");
            _itemsStringLookup    = GetLookup(stringListGroupStorage, "Items");
            _levelAreaNamesLookup = GetLookup(stringListGroupStorage, "LevelAreaNames");

            IsInitialized = true;
        }
Exemple #10
0
        public static List <Grupo> List(int Cod_Comum = 0, Context cx = null)
        {
            var list = MemoryContext.GetCache <List <Grupo> >(Cod_Comum);

            if (list.Count == 0)
            {
                if (cx == null)
                {
                    cx = new Context();
                }

                list = cx.Query <Grupo>(
                    @"select
                            Cod_Grupo
                        ,Nome 
                        ,Cod_Comum 
                        from Grupo
                        where Cod_Comum = @Cod_Comum", new { Cod_Comum }).ToList();
                MemoryContext.SetCache <List <Grupo> >(list, Cod_Comum);
            }
            return(list);
        }
Exemple #11
0
        public static List <TipoEstudo> List(Context cx = null)
        {
            var list = MemoryContext.GetCache <List <TipoEstudo> >();

            if (list.Count == 0)
            {
                if (cx == null)
                {
                    cx = new Context();
                }

                list = cx.Query <TipoEstudo>(
                    @"select
                        Cod_Tipo
                       ,Nome
                       ,Controle 
                    from TipoEstudo
                    order by Nome").ToList();
                MemoryContext.SetCache <List <TipoEstudo> >(list);
            }

            return(list);
        }
Exemple #12
0
        public void Update(MemoryContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException(nameof(ctx));
            }

            try
            {
                if (!IsLocalActorValid(ctx))
                {
                    return;
                }

                if (!IsObjectManagerOnNewFrame(ctx))
                {
                    return;
                }

                var itemsToAdd    = new List <IMapMarker>();
                var itemsToRemove = new List <IMapMarker>();

                _acdsObserver = _acdsObserver ?? new ContainerObserver <ACD>(ctx.DataSegment.ObjectManager.ACDManager.ActorCommonData);
                _acdsObserver.Update();

                // Must have a local ACD to base coords on.
                if (_playerAcd == null)
                {
                    var playerAcdId = ctx.DataSegment.ObjectManager.PlayerDataManager[
                        ctx.DataSegment.ObjectManager.Player.LocalPlayerIndex].ACDID;

                    var index = Array.IndexOf(_acdsObserver.CurrentMapping, playerAcdId);
                    if (index != -1)
                    {
                        _playerAcd = MemoryObjectFactory.UnsafeCreate <ACD>(new BufferMemoryReader(_acdsObserver.CurrentData), index * _acdsObserver.Container.ItemSize);
                    }
                }

                foreach (var acd in _acdsObserver.OldItems)
                {
                    var marker = default(IMapMarker);
                    if (_minimapItemsDic.TryGetValue(acd.Address, out marker))
                    {
                        Trace.WriteLine("Removing " + acd.Name);
                        itemsToRemove.Add(marker);
                        _minimapItemsDic.Remove(acd.Address);
                    }
                }

                foreach (var acd in _acdsObserver.NewItems)
                {
                    var actorSnoId = acd.ActorSNO;
                    if (_ignoredSnoIds.Contains(actorSnoId))
                    {
                        continue;
                    }

                    if (!_minimapItemsDic.ContainsKey(acd.Address))
                    {
                        bool ignore;
                        var  minimapItem = MapMarkerFactory.Create(acd, out ignore);
                        if (ignore)
                        {
                            _ignoredSnoIds.Add(actorSnoId);
                        }
                        else if (minimapItem != null)
                        {
                            _minimapItemsDic.Add(acd.Address, minimapItem);
                            itemsToAdd.Add(minimapItem);
                        }
                    }
                }

                UpdateUI(itemsToAdd, itemsToRemove);
            }
            catch (Exception exception)
            {
                OnUpdateException(exception);
            }
        }
 public AnimalTypeMemoryMockRepository(MemoryContext <AnimalTypeMemoryMockModel> animalTypeContext)
 {
     _animalTypeContext = animalTypeContext;
 }
Exemple #14
0
 public WatcherThread(MemoryContext ctx, int updateInterval)
 {
     _ctx   = ctx;
     _timer = new Timer(OnTick, null, Timeout.Infinite, updateInterval);
 }
Exemple #15
0
 public WatcherThread(MemoryContext ctx)
     : this(ctx, _defaultUpdateInterval)
 {
 }
Exemple #16
0
        static void Main()
        {
            using (memoryContext = new MemoryContext())
                using (ffxivContext = new FfxivContext())
                {
                    // Create sqlite database in memory for data processing...
                    Console.WriteLine("[Memory] Creating temporary database...");
                    Console.WriteLine();
                    memoryContext.Database.EnsureCreated();

                    // Read and cache global client data.
                    SqCache sqCache = new SqCache(GlobalClientPath, "0a0000.win32.index", "0a0000.win32.dat0");

                    // Process BaseParam into memory.
                    Console.WriteLine("[Memory][BaseParam] Processing...");
                    ExHFile baseParamExH = new ExHFile(sqCache.GetFile("exd", "BaseParam.exh"));
                    baseParamExH.Iterate(sqCache, "exd", "BaseParam_{0}_en.exd", exDFile => {
                        exDFile.Iterate(row => {
                            Memory.Models.BaseParamModel baseParam = new Memory.Models.BaseParamModel();
                            baseParam.SetFromRow(row);
                            memoryContext.Add(baseParam);
                        });
                    });
                    Console.WriteLine("[Memory][BaseParam] Saving...");
                    Console.WriteLine();
                    memoryContext.SaveChanges();

                    // Process ClassJobCategory into memory.
                    Console.WriteLine("[Memory][ClassJobCategory] Processing...");
                    ExHFile classJobCategoryExH = new ExHFile(sqCache.GetFile("exd", "ClassJobCategory.exh"));
                    classJobCategoryExH.Iterate(sqCache, "exd", "ClassJobCategory_{0}_en.exd", exDFile => {
                        exDFile.Iterate(row => {
                            Memory.Models.ClassJobCategoryModel classJobCategory = new Memory.Models.ClassJobCategoryModel();
                            classJobCategory.SetFromRow(row);
                            memoryContext.Add(classJobCategory);
                        });
                    });
                    Console.WriteLine("[Memory][ClassJobCategory] Saving...");
                    Console.WriteLine();
                    memoryContext.SaveChanges();

                    // Process EquipSlotCategory into memory.
                    Console.WriteLine("[Memory][EquipSlotCategory] Processing...");
                    ExHFile equipSlotCategoryExH = new ExHFile(sqCache.GetFile("exd", "EquipSlotCategory.exh"));
                    equipSlotCategoryExH.Iterate(sqCache, "exd", "EquipSlotCategory_{0}.exd", exDFile => {
                        exDFile.Iterate(row => {
                            Memory.Models.EquipSlotCategoryModel equipSlotCategory = new Memory.Models.EquipSlotCategoryModel();
                            equipSlotCategory.SetFromRow(row);
                            memoryContext.Add(equipSlotCategory);
                        });
                    });
                    Console.WriteLine("[Memory][EquipSlotCategory] Saving...");
                    Console.WriteLine();
                    memoryContext.SaveChanges();

                    // Process ItemUICategory into memory.
                    Console.WriteLine("[Memory][ItemUICategory] Processing...");
                    ExHFile itemUICategoryExH = new ExHFile(sqCache.GetFile("exd", "ItemUICategory.exh"));
                    itemUICategoryExH.Iterate(sqCache, "exd", "ItemUICategory_{0}_en.exd", exDFile => {
                        exDFile.Iterate(row => {
                            Memory.Models.ItemUICategoryModel itemUICategory = new Memory.Models.ItemUICategoryModel();
                            itemUICategory.SetFromRow(row);
                            memoryContext.Add(itemUICategory);
                        });
                    });
                    Console.WriteLine("[Memory][ItemUICategory] Saving...");
                    Console.WriteLine();
                    memoryContext.SaveChanges();

                    string[] equipmentCategories =
                    {
                        "Pugilist's Arm",
                        "Gladiator's Arm",
                        "Marauder's Arm",
                        "Archer's Arm",
                        "Lancer's Arm",
                        "One-handed Thaumaturge's Arm",
                        "Two-handed Thaumaturge's Arm",
                        "One-handed Conjurer's Arm",
                        "Two-handed Conjurer's Arm",
                        "Arcanist's Grimoire",
                        "Shield",
                        "Head",
                        "Body",
                        "Legs",
                        "Hands",
                        "Feet",
                        "Waist",
                        "Necklace",
                        "Earrings",
                        "Bracelets",
                        "Ring",
                        "Rogue's Arm",
                        "Dark Knight's Arm",
                        "Machinist's Arm",
                        "Astrologian's Arm",
                        "Samurai's Arm",
                        "Red Mage's Arm",
                        "Scholar's Arm",
                        "Blue Mage's Arm",
                        "Gunbreaker's Arm",
                        "Dancer's Arm"
                    };

                    // Process Item into memory.
                    Console.WriteLine("[Memory][Item] Processing...");
                    ExHFile itemExH = new ExHFile(sqCache.GetFile("exd", "Item.exh"));
                    itemExH.Iterate(sqCache, "exd", "Item_{0}_en.exd", exDFile => {
                        exDFile.Iterate(row => {
                            Memory.Models.ItemModel item = new Memory.Models.ItemModel();

                            Memory.Models.ItemUICategoryModel itemUICategory = item.GetItemUICategoryFromRow(row);
                            ushort itemLevel = item.GetItemLevelFromRow(row);

                            if (equipmentCategories.Contains(itemUICategory.Name) && itemLevel >= 430)
                            {
                                item.SetFromRow(row, "en");
                                memoryContext.Equipments.Add(item);
                            }
                            else if (itemUICategory.Name == "Meal" && itemLevel >= 430)
                            {
                                item.SetFromRow(row, "en");
                                memoryContext.Foods.Add(item);
                            }
                            else if (itemUICategory.Name == "Materia")
                            {
                                item.SetFromRow(row, "en");
                                memoryContext.Materias.Add(item);
                            }
                        });
                    });
                    Console.WriteLine("[Memory][Item] Saving...");
                    Console.WriteLine();
                    memoryContext.SaveChanges();

                    // Process Item.

                    /*Console.WriteLine("[Item] Processing...");
                     * ExHFile globalItemExH = new ExHFile(globalSqCache.GetFile("exd", "Item.exh"));
                     * globalItemExH.Iterate(globalSqCache, "exd", "Item_{0}_en.exd", exDFile =>
                     * {
                     *  exDFile.Iterate(row =>
                     *  {
                     *      // Construct new item model from row.
                     *      ItemModel item = new ItemModel()
                     *      {
                     *          RowKey = row.Key,
                     *          LastUpdated = GlobalVersion
                     *      };
                     *      item.SetFromRow(row, "en");
                     *
                     *      // See if item with the same row key already exists in the database.
                     *      ItemModel existingItem = ffxivContext.Items.FirstOrDefault(_item => _item.RowKey == item.RowKey);
                     *
                     *      // If doesn't exist, insert it.
                     *      if (existingItem == null)
                     *      {
                     *          ffxivContext.Add(item);
                     *      }
                     *      // If does exist, compare values and update it only if necessary.
                     *      else
                     *      {
                     *          item.NameJa = existingItem.NameJa;
                     *          item.NameKo = existingItem.NameKo;
                     *
                     *          if (!Utility.Equals<ItemBaseModel>(item, existingItem))
                     *          {
                     *              // Update to current values and set last updated patch version to current version.
                     *              Utility.Set<ItemBaseModel>(existingItem, item);
                     *              existingItem.LastUpdated = GlobalVersion;
                     *          }
                     *      }
                     *
                     *      ffxivContext.SaveChanges();
                     *  });
                     * });
                     */
                }
        }
Exemple #17
0
 public ValuesController(MemoryContext db)
 {
     Database = db;
 }
 public ApplicationSnapshot(MemoryContext ctx)
 {
     MemoryContext = ctx ?? throw new ArgumentNullException(nameof(ctx));
 }
 public RepositoryInMemory(MemoryContext memoryContext)
 {
     _memoryContext = memoryContext;
 }
Exemple #20
0
        public ActionResult Index(int Cod_Comum)
        {
            Dash dash = MemoryContext.GetCache <Dash>(Cod_Comum);

            if (UserSession.Get(Request.HttpContext).Dev() && Request.Host.Host == "localhost")
            {
                return(View(dash));
            }

            if (dash == null || dash.Cod_Comum == 0)
            {
                if (Cod_Comum == 0 || !UserSession.Get(Request.HttpContext).Admin())
                {
                    Cod_Comum = UserSession.Get(Request.HttpContext).Cod_Comum();
                }

                List <object> categorias = new List <object>();
                foreach (var item in ItemGrafico.Categorias(Cod_Comum))
                {
                    categorias.Add(new object[] {
                        item.Descricao, item.Qtde
                    });
                }

                List <object> vozes = new List <object>();
                foreach (var item in ItemGrafico.Vozes(Cod_Comum))
                {
                    vozes.Add(new object[] {
                        item.Descricao, item.Qtde
                    });
                }

                List <Categoria> ListaCategorias = Categoria.List();
                Categoria        Cordas          = ListaCategorias.FirstOrDefault(e => { return(e.Nome == "Cordas"); });
                Categoria        Madeiras        = ListaCategorias.FirstOrDefault(e => { return(e.Nome == "Madeiras"); });
                Categoria        Metais          = ListaCategorias.FirstOrDefault(e => { return(e.Nome == "Metais"); });

                List <object> vozesCordas = new List <object>();
                if (Cordas != null)
                {
                    foreach (var item in ItemGrafico.VozesCategoria(Cod_Comum, Cordas.Cod_Categoria))
                    {
                        vozesCordas.Add(new object[] {
                            item.Descricao, item.Qtde
                        });
                    }
                }

                List <object> vozesMadeiras = new List <object>();
                if (Madeiras != null)
                {
                    foreach (var item in ItemGrafico.VozesCategoria(Cod_Comum, Madeiras.Cod_Categoria))
                    {
                        vozesMadeiras.Add(new object[] {
                            item.Descricao, item.Qtde
                        });
                    }
                }

                List <object> vozesMetais = new List <object>();
                if (Metais != null)
                {
                    foreach (var item in ItemGrafico.VozesCategoria(Cod_Comum, Metais.Cod_Categoria))
                    {
                        vozesMetais.Add(new object[] {
                            item.Descricao, item.Qtde
                        });
                    }
                }

                string[]      colors       = new string[] { "#63bf60", "#bf6060", "#6076bf", "#bf60b3" };
                List <object> instrumentos = new List <object>();
                instrumentos.Add(new object[] {
                    "Element", "Qtde", new { role = "style" }
                });
                foreach (var item in ItemGrafico.Instrumentos(Cod_Comum))
                {
                    instrumentos.Add(new object[] {
                        item.Descricao, item.Qtde, colors[item.Cod_Categoria - 1]
                    });
                }

                dash               = new Dash();
                dash.Cod_Comum     = Cod_Comum;
                dash.Categorias    = categorias;
                dash.Vozes         = vozes;
                dash.VozesCordas   = vozesCordas;
                dash.VozesMadeiras = vozesMadeiras;
                dash.VozesMetais   = vozesMetais;
                dash.Instrumentos  = instrumentos;
                dash.Totais        = Usuario.Totais(Cod_Comum);
                MemoryContext.SetCache <Dash>(dash, Cod_Comum);
            }


            return(View(dash));
        }
Exemple #21
0
 public void SetUp()
 {
     _context            = new MemoryContext();
     _servicioRepository = new RepositoryInMemoryFactory <Servicio>(_context).Instance;
 }
        public ShowServiciosView(MemoryContext memoryContext)
        {
            _memoryContext = memoryContext;

            BindingContext = new ShowServiciosViewModel(memoryContext);
        }
        public static void RefreshKeys(string metadataLocation)
        {
            IssuingAuthority issuingAuthority = ValidatingIssuerNameRegistry.GetIssuingAuthority(metadataLocation);

            bool newKeys       = false;
            bool refreshTenant = false;

            foreach (string thumbprint in issuingAuthority.Thumbprints)
            {
                if (!ContainsKey(thumbprint))
                {
                    newKeys       = true;
                    refreshTenant = true;
                    break;
                }
            }

            foreach (string issuer in issuingAuthority.Issuers)
            {
                if (!ContainsTenant(GetIssuerId(issuer)))
                {
                    refreshTenant = true;
                    break;
                }
            }

            if (newKeys || refreshTenant)
            {
                using (var context = MemoryContext.GetContext())
                {
                    if (newKeys)
                    {
                        //context.IssuingAuthorityKeys.RemoveRange(context.IssuingAuthorityKeys);
                        context.IssuingAuthorityKeys.RemoveAll(key => key.Id.Length > 0);
                        foreach (string thumbprint in issuingAuthority.Thumbprints)
                        {
                            context.IssuingAuthorityKeys.Add(new IssuingAuthorityKey {
                                Id = thumbprint
                            });
                        }
                    }

                    if (refreshTenant)
                    {
                        // Add the default tenant to the registry.
                        // Comment or remove the following code if you do not wish to have the default tenant use the application.
                        foreach (string issuer in issuingAuthority.Issuers)
                        {
                            string issuerId = GetIssuerId(issuer);
                            if (!ContainsTenant(issuerId))
                            {
                                context.Tenants.Add(new Tenant {
                                    Id = issuerId
                                });
                            }
                        }
                    }
                    context.SaveChanges();
                }
            }
        }
Exemple #24
0
 public EditTicketServiceRepositoryInMemory(MemoryContext context)
 {
     _context = context;
 }
Exemple #25
0
 public BuyTicketServiceRepositoryInMemory(MemoryContext context)
 {
     this._context = context;
 }
Exemple #26
0
	public MemoryContext memory() {
		MemoryContext _localctx = new MemoryContext(Context, State);
		EnterRule(_localctx, 16, RULE_memory);
		try {
			EnterOuterAlt(_localctx, 1);
			{
			State = 96; Match(MEMSTART);
			State = 100;
			switch (TokenStream.La(1)) {
			case A:
			case B:
			case C:
			case D:
			case E:
			case F:
			case H:
			case L:
			case AF:
			case BC:
			case DE:
			case HL:
			case SP:
			case HLPLUS:
			case HLMINUS:
				{
				State = 97; register();
				}
				break;
			case Number:
				{
				State = 98; value();
				}
				break;
			case LIMSTRING:
				{
				State = 99; jump();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
			State = 102; Match(MEMEND);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			ErrorHandler.ReportError(this, re);
			ErrorHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}
 public AnimalMemoryMockRepository(MemoryContext <AnimalMemoryMockModel> animalContext, MemoryContext <AnimalTypeMemoryMockModel> animalTypeContext, MemoryContext <UserMemoryMockModel> userContext)
 {
     _animalContext     = animalContext;
     _animalTypeContext = animalTypeContext;
     _userContext       = userContext;
 }
Exemple #28
0
 public UseClientTicketServiceRepositoryInMemory(MemoryContext context)
 {
     this._context = context;
 }
Exemple #29
0
 public EnableTicketServicerepositoryInMemory(MemoryContext context)
 {
     this._context = context;
 }
Exemple #30
0
 public RegisterNewClientServiceRepositoryInMemory(MemoryContext context)
 {
     this._context = context;
 }
Exemple #31
0
 public UserSignInServiceRepositoryInMemory(MemoryContext context)
 {
     this.context = context;
 }
Exemple #32
0
 public SaveServicioCommand(MemoryContext context)
 {
     _context = context;
 }