private static string GetRequiredParam(string paramName, IProviderConfiguration config) { string paramValue; if (!config.Properties.TryGetValue(paramName, out paramValue)) throw new ArgumentException(String.Format("{0} property not set", paramName)); return paramValue; }