@model SharedLibraryCore.Configuration.ApplicationConfiguration @{ ViewData["Title"] = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONFIGURATION_TITLE"]; string optionalText = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["COMMAND_HELP_OPTIONAL"]; string advancedText = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONFIGURATION_ADVANCED"]; string addText = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONFIGURATION_ADD"]; var properties = Model.GetType().GetProperties(); string[] getLinkedPropertyName(System.Reflection.PropertyInfo info) { var test = (info.GetCustomAttributes(false) .Where(_attr => _attr.GetType() == typeof(SharedLibraryCore.Helpers.LinkedConfiguration)) .FirstOrDefault() as SharedLibraryCore.Helpers.LinkedConfiguration); return test?.LinkedPropertyNames ?? new string[0]; } bool shouldIgnore(System.Reflection.PropertyInfo info) => (info.GetCustomAttributes(false) .Where(_attr => _attr.GetType() == typeof(SharedLibraryCore.Helpers.ConfigurationIgnore)) .FirstOrDefault() as SharedLibraryCore.Helpers.ConfigurationIgnore) != null; bool isOptional(System.Reflection.PropertyInfo info) => (info.GetCustomAttributes(false) .Where(_attr => _attr.GetType() == typeof(SharedLibraryCore.Helpers.ConfigurationOptional)) .FirstOrDefault() as SharedLibraryCore.Helpers.ConfigurationOptional) != null; bool hasLinkedParent(System.Reflection.PropertyInfo info) { return Model.GetType().GetProperties().SelectMany(_prop => getLinkedPropertyName(_prop)).Contains(info.Name); } }