コード例 #1
0
        public Result Put(SegmentMatcherRequest request)
        {
            bool success = false;

            if (!string.IsNullOrEmpty(request.SegmentMatcher))
            {
                m_evaluator.AddSegmentMatch(request.SegmentMatcher);
                success = true;
            }
            return(new Result()
            {
                Success = success
            });
        }
コード例 #2
0
        public Result Delete(SegmentMatcherRequest request)
        {
            bool success = true;

            if (request.SegmentMatcher == null)
            {
                m_evaluator.ClearSegmentMatchers();
            }
            else
            {
                success = m_evaluator.RemoveSegmentMatcher(request.SegmentMatcher);
            }
            return(new Result()
            {
                Success = success
            });
        }