예제 #1
0
 public QueryResolver(ISeriesEngine seriesEngine, IMissionEngine missionEngine, ILogEngine logEngine, IEventEngine eventEngine)
 {
     _seriesEngine  = seriesEngine;
     _missionEngine = missionEngine;
     _logEngine     = logEngine;
     _eventEngine   = eventEngine;
 }
예제 #2
0
        public EventType(IFileEngine fileEngine, IMissionEngine missionEngine, ISeriesEngine seriesEngine)
        {
            Name        = "Event";
            Description = "Major events that occurred during the mission";

            Field(e => e.Id);
            Field(e => e.Text);
            Field(e => e.Timestamp);
            Field <FileType>("file", "Image associated with the series.", resolve: c => fileEngine.GetById(c.Source.FileId));
            Field <MissionType>("mission", "Mission the event occurred on.", resolve: c => missionEngine.GetMission(c.Source.MissionId));
            Field <SeriesType>("series", "Series of missions associated with the event.", resolve: c => seriesEngine.GetSeries(c.Source.SeriesId));
        }
예제 #3
0
        public MissionType(ISeriesEngine seriesEngine, IFileEngine fileEngine, ILogEngine logEngine)
        {
            Name        = "Mission";
            Description = "A set of missions that contributed to a larger objective";

            // Auto-mapped properties
            Field(s => s.Id);
            Field(s => s.MissionName).Description("The name of the mission.");

            // Custom-mapped properties
            Field <ListGraphType <SpeakerType> >("speakers", "Speakers whose voice was recorded in logs during this mission.", resolve: c => c.Source.Speakers);
            Field <FileType>("file", "Image associated with the mission.", resolve: c => fileEngine.GetById(c.Source.FileId));
            Field <SeriesType>("series", "The series this mission was a part of.", resolve: c => seriesEngine.GetSeries(c.Source.SeriesId));
            Field <ListGraphType <LogType> >("log", "Logs that were captured as part of this mission.", resolve: c => logEngine.GetLogsByMissionId(c.Source.Id));
            Field <LongGraphType>("logCount", "Number of logs that were captured as part of this mission.", resolve: c => logEngine.GetLogCountByMissionId(c.Source.Id));
        }
예제 #4
0
        public static async Task <Core.Series> GetOrCreateSeries(ISeriesEngine _seriesEngine, string seriesName, string seriesImage)
        {
            var series = await _seriesEngine.GetSeriesByName(seriesName);

            if (series == null)
            {
                Core.File file = null;
                if (!string.IsNullOrWhiteSpace(seriesImage))
                {
                    file = await FileLoader.GetLocalFile(seriesImage);
                }
                series = await _seriesEngine.CreateSeries(seriesName, file);

                Console.WriteLine($"Series Created: {series.SeriesName}-{series.Id}");
            }
            else
            {
                Console.WriteLine($"Series Found: {series.SeriesName}-{series.Id}");
            }
            return(series);
        }
예제 #5
0
 public GeminiLoader(ISeriesEngine seriesEngine, IMissionEngine missionEngine)
 {
     _seriesEngine  = seriesEngine;
     _missionEngine = missionEngine;
 }
예제 #6
0
 public SeriesController(ISeriesEngine seriesEngine)
 {
     _seriesEngine = seriesEngine;
 }
예제 #7
0
 public ApolloLoader(ISeriesEngine seriesEngine, IMissionEngine missionEngine, ILogEngine logEngine)
 {
     _seriesEngine  = seriesEngine;
     _missionEngine = missionEngine;
     _logEngine     = logEngine;
 }