You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetCustomSupportedTypes (ExpressionBuilder.Helpers.OperationHelper) throws NullReferenceException when you don't have the config section defined in your project.
foreach (var supportedType in _settings.SupportedTypes) { if (supportedType.Type != null) { TypeGroups[supportedType.TypeGroup].Add(supportedType.Type); } }
This foreach loop throws an exception since _settings.SupportedTypes is null.
Suggested change:
In ExpressionBuilder.Configuration.Settings class, LoadSettings method:
var configSection = ConfigurationManager.GetSection(ExpressionBuilderConfig.SectionName) as ExpressionBuilderConfig; if (configSection == null) {settings.SupportedTypes = new List(); return; }
I've added the part in bold. This seems to fix the problem.
The text was updated successfully, but these errors were encountered:
GetCustomSupportedTypes (ExpressionBuilder.Helpers.OperationHelper) throws NullReferenceException when you don't have the config section defined in your project.
foreach (var supportedType in _settings.SupportedTypes) { if (supportedType.Type != null) { TypeGroups[supportedType.TypeGroup].Add(supportedType.Type); } }
This foreach loop throws an exception since _settings.SupportedTypes is null.
Suggested change:
In ExpressionBuilder.Configuration.Settings class, LoadSettings method:
var configSection = ConfigurationManager.GetSection(ExpressionBuilderConfig.SectionName) as ExpressionBuilderConfig; if (configSection == null) {
settings.SupportedTypes = new List();return; }
I've added the part in bold. This seems to fix the problem.
The text was updated successfully, but these errors were encountered: