Beispiel #1
0
        public static BreakSequenceType GetBreakSeqTypeForMultipartSpot(
            string multipartSpot,
            string multipartSpotPosition)
        {
            string multipartSpotType = MultipartSpotTypes.GetSpotTypeAndPositionKey(
                multipartSpot,
                multipartSpotPosition);

            return(_breakSeqTypes.Find(bst =>
                                       bst.Category == BreakSequenceTypeCategory.MultipartSpot &&
                                       bst.MultipartSpotType == multipartSpotType
                                       ));
        }
Beispiel #2
0
        private static List <BreakSequenceType> GetAll()
        {
            var breakSeqTypes = new List <BreakSequenceType>();

            // First in break
            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(1, PositionInBreakRequests.TrueFirst, -150000));
            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(2, PositionInBreakRequests.First, -140000));

            // Multipart Top/Tail (Top)
            breakSeqTypes.Add(
                CreateMultipartSpot(
                    3,
                    MultipartSpotTypes.GetSpotTypeAndPositionKey(MultipartSpotTypes.TopTail, MultipartSpotPositions.TopTail_Top),
                    -130000)
                );

            // Multipart Same Break (Top)
            breakSeqTypes.Add(
                CreateMultipartSpot(
                    4,
                    MultipartSpotTypes.GetSpotTypeAndPositionKey(MultipartSpotTypes.SameBreak, MultipartSpotPositions.SameBreak_Top),
                    -120000)
                );

            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(5, PositionInBreakRequests.SecondFromStart, -110000));
            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(6, PositionInBreakRequests.ThirdFromStart, -100000));

            // Middle of break, from 4th onwards
            breakSeqTypes.Add(CreateMiddleOfBreak(7, 1, 10000));

            // Multipart Same Break (Mid)
            breakSeqTypes.Add(CreateMultipartSpot(8, MultipartSpotTypes.GetSpotTypeAndPositionKey(MultipartSpotTypes.SameBreak, MultipartSpotPositions.SameBreak_Mid), 20000));

            // Multipart Same Break (Any)
            breakSeqTypes.Add(CreateMultipartSpot(9, MultipartSpotTypes.GetSpotTypeAndPositionKey(MultipartSpotTypes.SameBreak, MultipartSpotPositions.SameBreak_Any), 30000));

            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(10, PositionInBreakRequests.ThirdFromLast, 100000));
            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(11, PositionInBreakRequests.SecondFromLast, 110000));

            // Multipart Same Break (Tail)
            breakSeqTypes.Add(CreateMultipartSpot(12, MultipartSpotTypes.GetSpotTypeAndPositionKey(MultipartSpotTypes.SameBreak, MultipartSpotPositions.SameBreak_Tail), 120000));

            // Multipart Top/Tail (Tail)
            breakSeqTypes.Add(CreateMultipartSpot(13, MultipartSpotTypes.GetSpotTypeAndPositionKey(MultipartSpotTypes.TopTail, MultipartSpotPositions.TopTail_Tail), 130000));

            // Last in break
            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(14, PositionInBreakRequests.Last, 140_000));
            breakSeqTypes.Add(CreateRequestedPositionInBreakRequest(15, PositionInBreakRequests.TrueLast, 150_000));

            return(breakSeqTypes);
        }