Exemplo n.º 1
0
        public PCExpertModel CreateRandomData(PersistenceWorkplace workplace)
        {
            Contract.Requires(workplace != null);

            var slotsToInsert      = CreateSlots();
            var characteristics    = CreateCharacteristics();
            var componentsToInsert = CreateComponents(slotsToInsert, characteristics);
            var configurations     = CreateConfigurations(componentsToInsert);

            workplace.Insert <ComponentCharacteristic>(characteristics);
            workplace.Insert <ComponentInterface>(slotsToInsert);
            workplace.Insert <PCComponent>(componentsToInsert);
            workplace.Insert <PCConfiguration>(configurations);

            return(new PCExpertModel
            {
                Components = componentsToInsert,
                Interfaces = slotsToInsert,
                Configurations = configurations,
                Characteristics = characteristics
            });
        }
 protected override IComponentInterfaceRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace)
 {
     return(new ComponentInterfaceRepository(workplace));
 }
 public PCConfigurationRepository(PersistenceWorkplace workplace)
 {
     _workplace = workplace;
 }
Exemplo n.º 4
0
 protected abstract TRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace);
Exemplo n.º 5
0
 public PCComponentRepository(PersistenceWorkplace workplace)
 {
     _workplace = workplace;
 }
 public ComponentInterfaceRepository(PersistenceWorkplace workplace)
 {
     _workplace = workplace;
 }
Exemplo n.º 7
0
 protected override IPCConfigurationRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace)
 {
     return(new PCConfigurationRepository(workplace));
 }
 protected override PCComponentRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace)
 {
     return(new PCComponentRepository(workplace));
 }