public static Reporter CreateReporter(ReporterType reporterType) { switch (reporterType) { case ReporterType.LogInstallationsReporter: return(new LogInstallationsReporter()); case ReporterType.LogLicensesReporter: return(new LogLicensesReporter()); case ReporterType.LicensesBySoftCountReporter: return(new LicensesBySoftCountReporter()); case ReporterType.InstallationsInfoReporter: return(new InstallationsInfoReporter()); case ReporterType.DepartmentReporter: return(new DepartmentReporter()); case ReporterType.PcReporter: return(new PcReporter()); } throw new ReporterException( string.Format(CultureInfo.InvariantCulture, "В фабрику ReporterFactory передан неизвестный тип {0}", reporterType)); }
public void InstantiateCourtGuest(ReporterType thisType) { GameObject tmp = null; ScenePointBehavior spawnPoint = spawnPointList.Find(x => x.gameObject.name == "Court Spawn"); if (spawnPoint == null) { return; } switch (currentCourtGuest.reporterType) { case ReporterType.Soldier: tmp = characterPrefabsList.Find(x => x.reporterType == ReporterType.Soldier).prefab; tmp = GameObject.Instantiate(tmp, spawnPoint.transform.position, Quaternion.identity, null); currentCourtGuest.characterSpawned = tmp.GetComponent <BaseCharacter>(); break; case ReporterType.Villager: tmp = characterPrefabsList.Find(x => x.reporterType == ReporterType.Villager).prefab; tmp = GameObject.Instantiate(tmp, spawnPoint.transform.position, Quaternion.identity, null); currentCourtGuest.characterSpawned = tmp.GetComponent <BaseCharacter>(); break; } if (currentCourtGuest.characterSpawned != null) { currentCourtGuest.characterSpawned.SpawnInThisPosition(spawnPoint); currentCourtGuest.characterSpawned.OrderMovement(spawnPoint.neighborPoints[0], PreStartCourt); } else { Debug.LogError("Unable to obtain character for [" + currentCourtGuest.reporterType + "], unable to find prefab."); } }
public CourtGuest CreateCourtGuest(ReporterType type) { CourtGuest tmp = new CourtGuest(); tmp.reporterType = type; return(tmp); }
private void RunDepReport(ReporterType reporterType, List <string> args) { var reporter = ReporterFactory.CreateReporter(reporterType); reporter.ReportOutputStreamResponse += reporter_ReportOutputStreamResponse; reporter.ReportComplete += reporter_ReportComplete; reporter.ReportCanceled += reporter_ReportCanceled; _reportCounter++; reporter.Run(args); }
private void RunReport(ReporterType reporterType) { var reporter = ReporterFactory.CreateReporter(reporterType); reporter.ReportOutputStreamResponse += reporter_ReportOutputStreamResponse; reporter.ReportComplete += reporter_ReportComplete; reporter.ReportCanceled += reporter_ReportCanceled; _reportCounter++; reporter.Run(); }
private static IProgressReporter GetReporter(ReporterType reporterType) { switch (reporterType) { case ReporterType.TeamCity: return new TeamCityProgressReporter(Console.WriteLine); default: return new DefaultProgressReporter(Console.WriteLine); } }
public static IReporter GetReporter(ReporterType type, ReporterOptions options) { var defaultReporter = new RemoteReporter.Builder() .WithSender(new UdpSender(options.RemoteHost, options.RemotePort, 0)) .Build(); switch (type) { case ReporterType.Remote: return(defaultReporter); default: return(defaultReporter); } }
public void SpawnCourtGuest(ReporterType guestType) { if (currentCourtGuest != null) { CourtGuest newGuest = CreateCourtGuest(guestType); if (queuedGuestList == null) { queuedGuestList = new List <CourtGuest>(); } queuedGuestList.Add(newGuest); } else { currentCourtGuest = CreateCourtGuest(guestType); } InstantiateCourtGuest(currentCourtGuest.reporterType); }
protected Reporter(ReporterType reporterType, ReportLevelType reportLevel) { ReporterType = reporterType; ReportLevel = reportLevel; }
private IReporter CreateReporter(ReporterType reporterType) { switch (reporterType) { case ReporterType.Plain: return new PlainTextReporter(); case ReporterType.XunitXml: return new XUnitReporter(); case ReporterType.XunitHtml: return new XUnitHtmlReporter(); case ReporterType.AngularJs: return new AngularJsReporter(); } throw new ArgumentException("Unknown reporter type: " + reporterType); }