private void AssertFieldIsSet(string fieldName, string value) { if (value == null || value.Length == 0) { throw new ApplicationException(fieldName + " must be set!"); } } }