コード例 #1
0
 public TrackingSession(string userId, string displayName, TrackingPosition position,
                        TrackingType trackingType)
 {
     UserId       = userId;
     DisplayName  = displayName;
     TrackingType = trackingType;
     AddPosition(position);
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public TrackingSession(string userId, TrackingPosition position)
 {
     UserId = userId;
     AddPosition(position);
 }