예제 #1
0
 public IEnumerator <ITask> ContainsHandler(Contains contains)
 {
     contains.ResponsePort.Post(
         ContainsResponse.FromRequest(contains.Body)
         );
     yield break;
 }
        /// <summary>
        /// FromRequest - Performs the Contains function
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public static ContainsResponse FromRequest(ContainsRequest request)
        {
            ContainsResponse response = new ContainsResponse();

#if URT_MINCLR
            response._contains = request.String.IndexOf(request.Query) >= 0;
#else
            response._contains = request.String.Contains(request.Query);
#endif

            return(response);
        }