/// <summary>
        /// Add your own curve type!
        /// Note your identifier cannot contain space.
        /// </summary>
        /// <param name="PBMIdentifier"></param>
        /// <param name="SegmentHandler"></param>
        public static void AddCurveType(string PBMIdentifier, CurveSegmentHandler SegmentHandler)
        {
            if (curveTypeHandlers.ContainsKey(PBMIdentifier))
            {
                throw new ArgumentException("You cannot modify existing curve type: " + PBMIdentifier);
            }
            if (PBMIdentifier.Contains(" "))
            {
                throw new ArgumentException("Identifier contains space at: " + PBMIdentifier.IndexOf(" "));
            }

            curveTypeHandlers.Add(PBMIdentifier, SegmentHandler);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Add your own curve type!
        ///     Note your identifier cannot contain space.
        /// </summary>
        /// <param name="pbmIdentifier"></param>
        /// <param name="segmentHandler"></param>
        public static void AddCurveType(string pbmIdentifier, CurveSegmentHandler segmentHandler)
        {
            if (_curveTypeHandlers.ContainsKey(pbmIdentifier))
            {
                throw new ArgumentException("You cannot modify existing curve type: " + pbmIdentifier);
            }
            if (pbmIdentifier.Contains(" "))
            {
                throw new ArgumentException("Identifier contains space at: " +
                                            pbmIdentifier.IndexOf(" ", StringComparison.Ordinal));
            }

            _curveTypeHandlers.Add(pbmIdentifier, segmentHandler);
        }