示例#1
0
 public IEnumerator <ITask> SubStringHandler(SubString subString)
 {
     subString.ResponsePort.Post(
         SubStringResponse.FromRequest(subString.Body)
         );
     yield break;
 }
        /// <summary>
        /// FromRequest - Perform the substring function
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public static SubStringResponse FromRequest(SubStringRequest request)
        {
            SubStringResponse response = new SubStringResponse();

            if (request.Length > 0)
            {
                response._subString = request.String.Substring(
                    request.StartIndex,
                    request.Length
                    );
            }
            else
            {
                response._subString = request.String.Substring(
                    request.StartIndex
                    );
            }
            return(response);
        }