Dev2.Runtime.ServiceModel.Data.Resource.ParseProperties C# (CSharp) Method

ParseProperties() public static method

public static ParseProperties ( string s, string>.Dictionary properties ) : void
s string
properties string>.Dictionary
return void
        public static void ParseProperties(string s, Dictionary<string, string> properties)
        {
            if(s == null)
            {
                throw new ArgumentNullException("s");
            }
            if(properties == null)
            {
                throw new ArgumentNullException("properties");
            }

            var props = s.Split(';');
            foreach(var p in props.Select(prop => prop.Split('=')).Where(p => p.Length >= 1))
            {
                var key = p[0];
                if(!properties.ContainsKey(key))
                {
                    continue;
                }
                properties[key] = string.Join("=", p.Skip(1));
            }
        }