public MaterialsSteps(MaterialsContext materialsContext,
                       LightsContext lightsContext,
                       ColorsContext colorContext,
                       ComputationsContext computationsContext,
                       SphereContext sphereContext)
 {
     _computationsContext = computationsContext;
     _sphereContext       = sphereContext;
     _colorsContext       = colorContext;
     _lightsContext       = lightsContext;
     _materialsContext    = materialsContext;
 }
Beispiel #2
0
        private static async Task InsertTestData(ColorsContext context)
        {
            if (context.Colors.Any())
            {
                return;
            }
            var one = new List <Color>()
            {
                new Color {
                    Rgb          = "#FF0000",
                    translations = new List <Translation>()
                    {
                        new Translation {
                            Language = "catalan", Name = "vermell"
                        },
                        new Translation {
                            Language = "spanish", Name = "rojo"
                        },
                        new Translation {
                            Language = "english", Name = "red"
                        }
                    }
                },
                new Color {
                    Rgb          = "#000000",
                    translations = new List <Translation>()
                    {
                        new Translation {
                            Language = "catalan", Name = "negre"
                        },
                        new Translation {
                            Language = "english", Name = "black"
                        }
                    }
                },
                new Color {
                    Rgb          = "#0000FF",
                    translations = new List <Translation>()
                    {
                        new Translation {
                            Language = "catalan", Name = "blau"
                        },
                    }
                }
            };

            context.AddRange(one);
            await context.SaveChangesAsync();
        }
Beispiel #3
0
 public WorldSteps(WorldContext worldContext,
                   SphereContext sphereContext,
                   RayContext rayContext,
                   ColorsContext colorContext,
                   PointsContext pointsContext,
                   LightsContext lightsContext,
                   PlanesContext planesContext,
                   ComputationsContext computationsContext)
 {
     _computationsContext = computationsContext;
     _planesContext       = planesContext;
     _lightsContext       = lightsContext;
     _pointsContext       = pointsContext;
     _colorContext        = colorContext;
     _rayContext          = rayContext;
     _sphereContext       = sphereContext;
     _worldContext        = worldContext;
 }
Beispiel #4
0
 public ColorRepository(ColorsContext context)
 {
     _context = context;
 }
 public TranslationRepository(ColorsContext context)
 {
     _context = context;
 }
Beispiel #6
0
 public ColorsSteps(ColorsContext colorContext)
 {
     _colorContext = colorContext;
 }
Beispiel #7
0
 public PatternsSteps(PatternsContext patternsContext, ColorsContext colorContext, SphereContext sphereContext)
 {
     _sphereContext   = sphereContext;
     _colorContext    = colorContext;
     _patternsContext = patternsContext;
 }