CCNet.Build.CheckProject.CheckAssemblyInfo.ParseProperties C# (CSharp) Method

ParseProperties() private method

private ParseProperties ( IEnumerable lines ) : string>.Dictionary
lines IEnumerable
return string>.Dictionary
		private Dictionary<string, string> ParseProperties(IEnumerable<string> lines)
		{
			var propertyRegex = new Regex(@"^\[assembly: Assembly(?<Name>\w+)\((?<Value>.*)\)]$");

			var result = new Dictionary<string, string>();
			foreach (var line in lines)
			{
				if (!propertyRegex.IsMatch(line))
					continue;

				var match = propertyRegex.Match(line);
				var name = match.Groups["Name"].Value;
				var value = match.Groups["Value"].Value.Trim('"');

				result.Add(name, value);
			}

			return result;
		}
	}
CheckAssemblyInfo