/// <summary> /// Adds an entity. /// </summary> /// <param name="stopTime"></param> public void Add(StopTime stopTime) { string sql = "INSERT INTO stop_time VALUES (:feed_id, :trip_id, :arrival_time, :departure_time, :stop_id, :stop_sequence, :stop_headsign, :pickup_type, :drop_off_type, :shape_dist_traveled);"; using (var command = _connection.CreateCommand()) { command.CommandText = sql; command.Parameters.Add(new SQLiteParameter(@"feed_id", DbType.Int64)); command.Parameters.Add(new SQLiteParameter(@"trip_id", DbType.String)); command.Parameters.Add(new SQLiteParameter(@"arrival_time", DbType.Int64)); command.Parameters.Add(new SQLiteParameter(@"departure_time", DbType.Int64)); command.Parameters.Add(new SQLiteParameter(@"stop_id", DbType.String)); command.Parameters.Add(new SQLiteParameter(@"stop_sequence", DbType.Int64)); command.Parameters.Add(new SQLiteParameter(@"stop_headsign", DbType.String)); command.Parameters.Add(new SQLiteParameter(@"pickup_type", DbType.Int64)); command.Parameters.Add(new SQLiteParameter(@"drop_off_type", DbType.Int64)); command.Parameters.Add(new SQLiteParameter(@"shape_dist_traveled", DbType.String)); command.Parameters[0].Value = _id; command.Parameters[1].Value = stopTime.TripId; command.Parameters[2].Value = stopTime.ArrivalTime.TotalSeconds; command.Parameters[3].Value = stopTime.DepartureTime.TotalSeconds; command.Parameters[4].Value = stopTime.StopId; command.Parameters[5].Value = stopTime.StopSequence; command.Parameters[6].Value = stopTime.StopHeadsign; command.Parameters[7].Value = stopTime.PickupType.HasValue ? (int?)stopTime.PickupType.Value : null; command.Parameters[8].Value = stopTime.DropOffType.HasValue ? (int?)stopTime.DropOffType.Value : null; command.Parameters[9].Value = stopTime.ShapeDistTravelled; command.ExecuteNonQuery(); } }
public Logic(StopTime <T> stage) : base(stage.Shape) { _stage = stage; SetHandler(stage.Outlet, this); SetHandler(stage.Inlet, this); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0} {1} {2}-->{3} Owner: {4} {5}pkt ({6})", _conn.ToString(), Protocol == Packet.Protocol.TCP ? "TCP" : "UDP", StartTime.ToString("HH:mm:ss.f"), StopTime.ToString("HH:mm:ss.f"), ProcessName, _flows.Count, Conversationflow2.GetFlowTypeName(this.Type) ); //sb.AppendFormat(" {0} ", Protocol == Packet.Protocol.TCP ? "TCP" : "UDP"); //sb.AppendFormat("{0} ", StartTime.ToString("HH:mm:ss.f")); //sb.AppendFormat("End at {0} ", StopTime.ToString("HH:mm:ss.f")); //sb.AppendFormat("Process Name: {0} ", ProcessName); //sb.AppendFormat("Total packets: {0} packets ", _pktList.Count); //sb.AppendFormat("Total payload: {0} bytes\n", TotalTraffic); //sb.AppendFormat("First Packet Size: {0} bytes\n", FPS); //sb.AppendFormat("Packet per second: {0:n2} pps\n", PPS); //sb.AppendFormat("Average payload length: {0:n2} bytes\n", APL); //sb.AppendFormat("Payload Variance : {0:n2} \n", PV); return(sb.ToString()); }
private void AddStopTime() { if (StopTime <= 4.Seconds()) { StopTime.Add(1.Seconds()); } }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Attenuation/Distance/Min", true, out subEle); subEle.Value = MinAttenuationDistance.ToString(); ele.TryPathTo("Attenuation/Distance/Max", true, out subEle); subEle.Value = MaxAttenuationDistance.ToString(); ele.TryPathTo("FrequencyAdjustmentPercentage", true, out subEle); subEle.Value = FrequencyAdjustmentPercentage.ToString(); WriteUnusedXML(ele, master); ele.TryPathTo("Flags", true, out subEle); subEle.Value = SoundDataFlags.ToString(); ele.TryPathTo("Attenuation/StaticAttenuationcdB", true, out subEle); subEle.Value = StaticAttenuationcdB.ToString(); ele.TryPathTo("Time/Stop", true, out subEle); subEle.Value = StopTime.ToString(); ele.TryPathTo("Time/Start", true, out subEle); subEle.Value = StartTime.ToString(); }
private void UpdateBusLocationsThread() { while (true) { var ctime = new StopTime(DateTime.Now); for (var a = 0; a < _mapContent.TripPointers.Length; a++) { var isDelayed = MapUtil.IsTripDelayed(_mapContent.Trips[a].Id); var pos = _mapContent.Trips[a].GetBusLocation(ctime); var cpointer = _mapContent.TripPointers[a]; if (pos == null) { continue; } if (cpointer >= _mapContent.Map.Pins.Count) { continue; } if (cpointer == -1) { _mapContent.TripPointers[a] = _mapContent.Map.Pins.Count; pos.Pin(_mapContent.Map.Pins, isDelayed ? _mapContent.Map.DelayedBusIndices : null, _mapContent.Trips[a].Id); } else { _mapContent.Map.Pins[cpointer].Position = new Position(pos.Latitude, pos.Longitude); } } if (_mapContent.Map.OnPinsUpdated != null) { Device.BeginInvokeOnMainThread(() => { _mapContent.Map.OnPinsUpdated(); }); } } }
//Сохранение периода расчета в ControllerData, saveStartStop = true - сохраняются также время запуска расчета, время останова и т.д. private void SavePeriod(bool saveStartStop) { try { _lastErrorPos = saveStartStop || _lastErrorPos != 1 ? 0 : 2; UpdateTablo(); _sysResult.PutSubValue("PeriodInfo", "PeriodBegin", PeriodBegin.ToString()); _sysResult.PutSubValue("PeriodInfo", "PeriodEnd", PeriodEnd.ToString()); if (_lastErrorTime == PeriodBegin) { _sysResult.PutSubValue("LastErrorInfo", "ErrorText", _lastErrorText); _sysResult.PutSubValue("LastErrorInfo", "ErrorPeriodBegin", _lastErrorTime.ToString()); } if (saveStartStop) { _lastErrorPos = 0; _sysResult.PutSubValue("PeriodInfo", "CalcName", CalcName); _sysResult.PutSubValue("PeriodInfo", "StartMoment", StartMoment.ToString()); _sysResult.PutSubValue("PeriodInfo", "StartTime", StartTime.ToString()); _sysResult.PutSubValue("PeriodInfo", "StopTime", StopTime.ToString()); _sysResult.PutSubValue("PeriodInfo", "IsStopTime", IsStopTime ? "True" : "False"); } } catch (Exception ex) { AddError("Ошибка записи в SysTabl файла результатов", ex); } }
/// <summary> /// Return the human-friendly textual description of the sschedule pattern /// </summary> /// <returns></returns> public string GetTextualDescription() { StringBuilder sb = new StringBuilder(); // daily pattern if (Times != null && Times.Count() > 0) { sb.Append("at "); bool fst = false; Times.ForEach(x => { sb.Append(string.Format("{0}{1}", fst ? ", " : " ", x.ToString())); fst = true; }); } else { if (StartTime > startTimeDefault) { sb.Append(string.Format("from {0} ", StartTime.ToString())); } if (StopTime < stopTimeDefault) { sb.Append(string.Format("to {0} ", StopTime.ToString())); } if (DailyInterval > 0 && (DailyFrequency == RecurrenceFrequency.Secondly || DailyFrequency == RecurrenceFrequency.Minutely || DailyFrequency == RecurrenceFrequency.Hourly)) { sb.Append(string.Format(" every {0} {1}", DailyInterval.ToString(), DailyFrequency == RecurrenceFrequency.Hourly ? "hours" : (DailyFrequency == RecurrenceFrequency.Minutely ? "minutes" : "seconds"))); } } // day/week/month pattern return(sb.ToString()); }
public ActionResult DeleteConfirmed(int id) { StopTime stopTime = db.StopTimes.Find(id); db.StopTimes.Remove(stopTime); db.SaveChanges(); return(RedirectToAction("Index")); }
private MapContent() { Trips = MapUtil.GetDefaultTripFile(); TripPointers = new int[Trips.Count]; Console.WriteLine("Est. Screen size: " + App.GetScreenWidth() + ", " + App.GetScreenHeight()); Map = new DefaultMap(); FavoritesButton = new Button { HorizontalOptions = LayoutOptions.Start, VerticalOptions = LayoutOptions.End, WidthRequest = 50, HeightRequest = 50, Image = (FileImageSource)(ImageSource.FromFile("Star_Button.png")), BackgroundColor = new Color(0, 1, 0), Margin = new Thickness(10, 0, 0, 10), #if __IOS__ CornerRadius = 25, #endif }; SettingsButton = new Button { HorizontalOptions = LayoutOptions.End, VerticalOptions = LayoutOptions.End, WidthRequest = 50, HeightRequest = 50, Image = (FileImageSource)(ImageSource.FromFile("Settings_Button.png")), BackgroundColor = new Color(0, 1, 0), Margin = new Thickness(0, 0, 10, 10), #if __IOS__ CornerRadius = 25, #endif }; var rightNow = new StopTime(DateTime.Now); for (var a = 0; a < Trips.Count; a++) { var isDelayed = MapUtil.IsTripDelayed(Trips[a].Id); Utility.Vertex vert = Trips[a].GetBusLocation(rightNow); TripPointers[a] = Map.Pins.Count; if (vert == null) { continue; } vert.Pin(Map.Pins, (!_taggedRandomBus || isDelayed) ? Map.DelayedBusIndices : null, Trips[a].Id); _taggedRandomBus = true; } MapUtil.Favorites.OnFavouriteAdded += UpdateServer; Content = new ContentPage { Content = new Grid { Children = { Map, FavoritesButton, SettingsButton } } }; }
public async Task <ActionResult> DeleteConfirmed(int id) { StopTime stopTime = await db.StopTimes.FindAsync(id); db.StopTimes.Remove(stopTime); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public ActionResult Edit(StopTime stoptime) { if (ModelState.IsValid) { db.Entry(stoptime).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stoptime)); }
public ActionResult Edit([Bind(Include = "StopTimeId,Direction,Destination,StopId,TimeOfStop,Route")] StopTime stopTime) { if (ModelState.IsValid) { db.Entry(stopTime).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stopTime)); }
public ActionResult Create([Bind(Include = "StopTimeId,Direction,Destination,StopId,TimeOfStop,Route")] StopTime stopTime) { if (ModelState.IsValid) { db.StopTimes.Add(stopTime); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stopTime)); }
public ActionResult Create(StopTime stoptime) { if (ModelState.IsValid) { db.stop_times.Add(stoptime); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stoptime)); }
public static (string nanosecTotal, string milisecTotal, bool isHihgPrecisionEnabled) StopMeasurement(int numIterations = 1) { StopTime = DateTime.Now; TotalTime.Stop(); TimeSpan elapsed = StopTime.Subtract(StartTime); numTicks = TotalTime.ElapsedTicks; TotalTime.Reset(); return(((numTicks * nanosecPerTick) / numIterations).ToString(), elapsed.TotalSeconds.ToString("0.000000"), Stopwatch.IsHighResolution); }
/// <summary> /// Сохранить настройки. /// </summary> /// <param name="storage">Хранилище настроек.</param> public void Save(SettingsStorage storage) { storage.SetValue("AutoStart", AutoStart); storage.SetValue("MinimizeToTray", MinimizeToTray); storage.SetValue("IsServer", IsServer); storage.SetValue("MaxSecurityCount", MaxSecurityCount); storage.SetValue("Authorization", Authorization.To <string>()); storage.SetValue("AutoStop", AutoStop); storage.SetValue("StopTime", StopTime.To <long>()); storage.SetValue("EmailErrorCount", EmailErrorCount); storage.SetValue("EmailErrorAddress", EmailErrorAddress); }
public void GetStopTimes_Passes() { //Arrange RestResponse <StopTimesList> response = new RestResponse <StopTimesList>(); response.Data = new StopTimesList(); StopTime sampleDepartureStopTime = new StopTime { phase = "departure", time = 1386078245, trip = new Trip() { tripShortName = "Trips Short Name", tripHeadsign = "10E EAST BROAD TO MC NAUGHTEN AND MOUNT CARMEL HOSPITAL", id = new Id() { agencyId = "COTA", id = "466817" } } }; response.Data.stopTimes.Add(sampleDepartureStopTime); StopTime sampleArrivalStopTime = new StopTime { phase = "arrival", time = 1386078245, trip = new Trip() { tripShortName = "Trips Short Name", tripHeadsign = "10E EAST BROAD TO MC NAUGHTEN AND MOUNT CARMEL HOSPITAL", id = new Id() { agencyId = "COTA", id = "466817" } } }; response.Data.stopTimes.Add(sampleArrivalStopTime); var mock = new Mock <IRestClient>(); mock.Setup(foo => foo.Execute <StopTimesList>(It.IsAny <IRestRequest>())).Returns(response); //Act OpenTripPlannerAdapter cut = new OpenTripPlannerAdapter(mock.Object); var results = cut.FindStopTimes("COTA", "2501", DateTime.UtcNow.AddHours(-5), DateTime.UtcNow); Assert.AreEqual(1, results.stopTimes.Count); Assert.AreEqual("departure", results.stopTimes.First().phase); }
// // GET: /StopTime/Edit/5 public ActionResult Edit(int id1, string id2) { if (id2 != null) { StopTime stoptime = db.stop_times.Where(q => q.stop_sequence == id1 && q.trip_id == id2).FirstOrDefault(); if (stoptime == null) { return(HttpNotFound()); } return(View(stoptime)); } return(HttpNotFound()); }
private void WaitServiceStateChange(Service svc, ServiceState ss) { DateTime StopTime; StopTime = DateTime.Now.AddSeconds((double)TimeoutUpDown.Value); while ((svc.ServiceState != ss) && (DateTime.Now < StopTime)) { System.Diagnostics.Debug.WriteLine(svc.ServiceState.ToString()); System.Diagnostics.Debug.WriteLine(StopTime.ToLongTimeString()); System.Threading.Thread.Sleep(250); svc.Refresh(); } }
static StopTime GetStartingStopTime(StopTime lastStopTime, IList <StopTime> stopTimes, int stopListCount) { if (lastStopTime == null) { return(new StopTime()); } var lastStopTimeIndex = stopTimes.IndexOf(lastStopTime); var startingStopTimeIndex = lastStopTimeIndex - stopListCount; var startingStopTime = stopTimes[startingStopTimeIndex]; return(startingStopTime); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Attenuation/Distance/Min", true, out subEle); subEle.Value = MinAttenuationDistance.ToString(); ele.TryPathTo("Attenuation/Distance/Max", true, out subEle); subEle.Value = MaxAttenuationDistance.ToString(); ele.TryPathTo("FrequencyAdjustmentPercentage", true, out subEle); subEle.Value = FrequencyAdjustmentPercentage.ToString(); WriteUnusedXML(ele, master); ele.TryPathTo("Flags", true, out subEle); subEle.Value = SoundDataFlags.ToString(); ele.TryPathTo("Attenuation/StaticAttenuationcdB", true, out subEle); subEle.Value = StaticAttenuationcdB.ToString(); ele.TryPathTo("Time/Stop", true, out subEle); subEle.Value = StopTime.ToString(); ele.TryPathTo("Time/Start", true, out subEle); subEle.Value = StartTime.ToString(); ele.TryPathTo("Attenuation/Curve/Point1", true, out subEle); subEle.Value = AttenuationCurvePoint1.ToString(); ele.TryPathTo("Attenuation/Curve/Point2", true, out subEle); subEle.Value = AttenuationCurvePoint2.ToString(); ele.TryPathTo("Attenuation/Curve/Point3", true, out subEle); subEle.Value = AttenuationCurvePoint3.ToString(); ele.TryPathTo("Attenuation/Curve/Point4", true, out subEle); subEle.Value = AttenuationCurvePoint4.ToString(); ele.TryPathTo("Attenuation/Curve/Point5", true, out subEle); subEle.Value = AttenuationCurvePoint5.ToString(); ele.TryPathTo("Attenuation/ReverbAttenuationControl", true, out subEle); subEle.Value = ReverbAttenuationControl.ToString(); ele.TryPathTo("Priority", true, out subEle); subEle.Value = Priority.ToString(); ele.TryPathTo("Unknown", true, out subEle); subEle.Value = Unknown.ToHex(); }
public bool Update(string stopId, string tripId, uint stopSequence, StopTime newEntity) { string sql = "UPDATE stop_time SET FEED_ID=:feed_id, trip_id=:trip_id, arrival_time=:arrival_time, departure_time=:departure_time, stop_id=:stop_id, stop_sequence=:stop_sequence, stop_headsign=:stop_headsign, pickup_type=:pickup_type, drop_off_type=:drop_off_type, shape_dist_traveled=:shape_dist_traveled, passenger_boarding=:passenger_boarding, passenger_alighting=:passenger_alighting, through_passengers=:through_passengers, total_passengers=:total_passengers, continuous_pickup=:continuous_pickup, continuous_drop_off=:continuous_drop_off WHERE stop_id=:oldStopId AND trip_id=:oldTripId AND stop_sequence=:oldStopSequence;"; using (var command = _connection.CreateCommand()) { command.CommandText = sql; command.Parameters.Add(new NpgsqlParameter(@"feed_id", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"trip_id", DbType.String)); command.Parameters.Add(new NpgsqlParameter(@"arrival_time", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"departure_time", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"stop_id", DbType.String)); command.Parameters.Add(new NpgsqlParameter(@"stop_sequence", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"stop_headsign", DbType.String)); command.Parameters.Add(new NpgsqlParameter(@"pickup_type", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"drop_off_type", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"shape_dist_traveled", DbType.String)); command.Parameters.Add(new NpgsqlParameter(@"passenger_boarding", DbType.Int32)); command.Parameters.Add(new NpgsqlParameter(@"passenger_alighting", DbType.Int32)); command.Parameters.Add(new NpgsqlParameter(@"through_passengers", DbType.Int32)); command.Parameters.Add(new NpgsqlParameter(@"total_passengers", DbType.Int32)); command.Parameters.Add(new NpgsqlParameter(@"continuous_pickup", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"continuous_drop_off", DbType.Int64)); command.Parameters.Add(new NpgsqlParameter(@"oldStopId", DbType.String)); command.Parameters.Add(new NpgsqlParameter(@"oldTripId", DbType.String)); command.Parameters.Add(new NpgsqlParameter(@"oldStopSequence", DbType.String)); command.Parameters[0].Value = _id; command.Parameters[1].Value = newEntity.TripId; command.Parameters[2].Value = newEntity.ArrivalTime.Value.TotalSeconds; command.Parameters[3].Value = newEntity.DepartureTime.Value.TotalSeconds; command.Parameters[4].Value = newEntity.StopId; command.Parameters[5].Value = newEntity.StopSequence; command.Parameters[6].Value = newEntity.StopHeadsign; command.Parameters[7].Value = newEntity.PickupType; command.Parameters[8].Value = newEntity.DropOffType; command.Parameters[9].Value = newEntity.ShapeDistTravelled; command.Parameters[10].Value = newEntity.PassengerBoarding; command.Parameters[11].Value = newEntity.PassengerAlighting; command.Parameters[12].Value = newEntity.ThroughPassengers; command.Parameters[13].Value = newEntity.TotalPassengers; command.Parameters[14].Value = newEntity.ContinuousPickup.HasValue ? (int?)newEntity.ContinuousPickup.Value : null; command.Parameters[15].Value = newEntity.ContinuousDropOff.HasValue ? (int?)newEntity.ContinuousDropOff.Value : null; command.Parameters[16].Value = stopId; command.Parameters[17].Value = tripId; command.Parameters[18].Value = stopSequence; command.Parameters.Where(x => x.Value == null).ToList().ForEach(x => x.Value = DBNull.Value); return(command.ExecuteNonQuery() > 0); } }
// GET: StopTimes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StopTime stopTime = db.StopTimes.Find(id); if (stopTime == null) { return(HttpNotFound()); } return(View(stopTime)); }
// GET: StopTimes/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StopTime stopTime = await db.StopTimes.FindAsync(id); if (stopTime == null) { return(HttpNotFound()); } return(View(stopTime)); }
private bool Validata(out string msg) { if (SearchItems.SearchItems.Count <= 0) { msg = "检索范围为空"; return(false); } if ((FeatureType & E_SEARCH_FEATURE_TYPE.E_SEARCH_FEATURE_TYPE_PASSLINE) > 0) { if (PassLineSet == new List <PassLine>() && RegionSet == new List <BreakRegion>()) { msg = "尚未绘制越界线或闯入闯出框"; return(false); } } if ((FeatureType & E_SEARCH_FEATURE_TYPE.E_SEARCH_FEATURE_TYPE_GLOBAL) > 0) { if (ObjRect == new System.Drawing.Rectangle()) { msg = "尚未绘制全局特征框"; return(false); } } if ((FeatureType & E_SEARCH_FEATURE_TYPE.E_SEARCH_FEATURE_TYPE_PARTICAL) > 0) { if (ObjDetailRect == new System.Drawing.Rectangle()) { msg = "尚未绘制局部特征框"; return(false); } } foreach (var item in SearchItems.SearchItems) { if (!item.IsHistoryTask && StopTime.Subtract(StartTime).TotalMinutes > 12 * 60 + 1) { msg = "实时视频检索不能超过 12 小时"; return(false); } } if (StartTime.CompareTo(StopTime) > 0) { msg = "结束时间不能小于开始时间"; return(false); } msg = ""; return(true); }
public string GetShortInfo() { StringBuilder sb = new StringBuilder(); sb.Append(StartTime.ToString("dddd dd/MM HH:mm")); sb.Append(" - "); sb.Append(StopTime.ToShortTimeString()); sb.Append(" " + Location); sb.Append(" " + Teacher); sb.Append(" " + CourseName); sb.Append(" " + Note); return(sb.ToString()); }
public async Task <ActionResult> Edit([Bind(Include = "id,tripId,stopId,arrival,departure,label,pickupTypeId,dropoffTypeId,shapeDistanceTraveled")] StopTime stopTime) { if (ModelState.IsValid) { db.Entry(stopTime).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.dropoffTypeId = new SelectList(db.StopCodes, "id", "label", stopTime.dropoffTypeId); ViewBag.pickupTypeId = new SelectList(db.StopCodes, "id", "label", stopTime.pickupTypeId); ViewBag.stopId = new SelectList(db.Stops, "id", "code", stopTime.stopId); ViewBag.tripId = new SelectList(db.Trips, "id", "label", stopTime.tripId); return(View(stopTime)); }
public void Stop() { if (IsRunning) { IsRunning = false; StopTime = DateTime.Now; Console.WriteLine("DateTime Now: {0}", DateTime.Now.ToString("yyyyMMddHHmmss")); Console.WriteLine("Stopped at {0}", StopTime.ToString("yyyyMMddHHmmss")); Console.WriteLine("You stopped after {0}", StopTime - StartTime); } else { throw new InvalidOperationException("Stopwatch can't be stopped: start it first."); } }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0} {1}-->{2} Owner: {3} {4}flow", _pairConn.ToString(), // Protocol == Packet2.Protocol.TCP ? "TCP" : "UDP", StartTime.ToString("HH:mm:ss.f"), StopTime.ToString("HH:mm:ss.f"), ProcessName, _flowList.Count // Flow2.GetFlowTypeName(this.Type) ); return(sb.ToString()); }
/// <summary> /// Adds an entity. /// </summary> /// <param name="entity"></param> public void Add(StopTime entity) { _entities.Add(entity); }
public StopTimeEqualityTest() { _sut1 = new StopTime(); _sut2 = new StopTime(); }