private IMessageIndicationObject HandleDeliverMemoryIndication(ref string input)
		{
			Regex regex = new Regex("\\+CMTI: \"(\\w+)\",(\\d+)");
			Match match = regex.Match(input);
			if (match.Success)
			{
				string value = match.Groups[1].Value;
				int num = int.Parse(match.Groups[2].Value);
				MemoryLocation memoryLocation = new MemoryLocation(value, num);
				input = input.Remove(match.Index, match.Length);
				return memoryLocation;
			}
			else
			{
				throw new ArgumentException("Input string does not contain an SMS-DELIVER memory location indication.");
			}
		}
Exemplo n.º 2
0
        private IMessageIndicationObject HandleStatusReportMemoryIndication(ref string input)
        {
            Regex regex = new Regex("\\+CDSI: \"(\\w+)\",(\\d+)");
            Match match = regex.Match(input);

            if (match.Success)
            {
                string         value          = match.Groups[1].Value;
                int            num            = int.Parse(match.Groups[2].Value);
                MemoryLocation memoryLocation = new MemoryLocation(value, num);
                input = input.Remove(match.Index, match.Length);
                return(memoryLocation);
            }
            else
            {
                throw new ArgumentException("Input string does not contain an SMS-STATUS-REPORT memory location indication.");
            }
        }