public MemoryStorage StringToMemoryStorage(string source) { MemoryStorage memoryStorage = new MemoryStorage(); string[] pairs = source.Split(';'); Regex keyValueMatcher = new Regex(@"(\w+)=""([\w\+\=\/\:]+)"""); foreach (string pair in pairs) { MatchCollection matches = keyValueMatcher.Matches(pair); foreach (Match match in matches) { string key = match.Groups [1].Value; string rawValue = match.Groups [2].Value; object objectValue = Converter.Deserialize(rawValue); memoryStorage.Insert(key, objectValue); } } return(memoryStorage); }