public TrackingSession(string userId, string displayName, TrackingPosition position, TrackingType trackingType) { UserId = userId; DisplayName = displayName; TrackingType = trackingType; AddPosition(position); }
public void AddPosition(TrackingPosition position) { switch (TrackingType) { case TrackingType.Single: Positions = new List <TrackingPosition> { position }; break; case TrackingType.TimeLimited: Positions.Add(position); Positions = Positions.Where(x => x.PositionTime < Expires).ToList(); break; default: Positions.Add(position); break; } }
public TrackingSession(string userId, TrackingPosition position) { UserId = userId; AddPosition(position); }