Code styling

This commit is contained in:
Benedek Farkas
2025-09-19 12:16:19 +02:00
parent 65eb601c0c
commit 1a0bfa17ab
3 changed files with 6 additions and 7 deletions

View File

@@ -1,12 +1,10 @@
using Orchard.ContentManagement;
using System;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.Handlers;
using Orchard.Fields.Fields;
using Orchard.Fields.Settings;
using Orchard.Localization;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Orchard.Fields.Drivers {
public class EnumerationFieldDriver : ContentFieldDriver<EnumerationField> {

View File

@@ -14,11 +14,11 @@ namespace Orchard.Fields.Fields {
public string[] SelectedValues {
get {
var value = Value;
if(string.IsNullOrWhiteSpace(value)) {
if (string.IsNullOrWhiteSpace(value)) {
return new string[0];
}
return value.Split(new [] { Separator }, StringSplitOptions.RemoveEmptyEntries);
return value.Split(new[] { Separator }, StringSplitOptions.RemoveEmptyEntries);
}
set {

View File

@@ -51,7 +51,8 @@ namespace Orchard.Widgets.Drivers {
try {
_conditionManager.Matches(layerPart.LayerRule);
} catch (Exception e) {
}
catch (Exception e) {
updater.AddModelError("Description", T("The rule is not valid: {0}", e.Message));
}
}