public static void EnsureFieldsNotNull(this IHasDataFieldDefinitions field, string dataHolderName) { if (field.Fields == null) { throw new DataHolderException("Field \"{0}\" of DataHolder \"{1}\" did not define any fields.", field, dataHolderName); } }
public static void EnsureFieldsNotNull(this IHasDataFieldDefinitions container) { if (container.Fields == null) { throw new DataHolderException(container.GetType().Name + " \"{0}\" did not define any fields.", container); } }