Skip to content

Commit a749bd9

Browse files
committed
"ImagePickergridConverter" now extends "GridConverterBase"
1 parent 4564005 commit a749bd9

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/Skybrud.ImagePicker/Grid/Converters/ImagePickerGridConverter.cs

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
using System;
2-
using System.Globalization;
3-
using Newtonsoft.Json.Linq;
1+
using Newtonsoft.Json.Linq;
42
using Skybrud.ImagePicker.Grid.Config;
53
using Skybrud.ImagePicker.Grid.Values;
64
using Skybrud.Umbraco.GridData;
5+
using Skybrud.Umbraco.GridData.Converters;
76
using Skybrud.Umbraco.GridData.Interfaces;
87
using Skybrud.Umbraco.GridData.Rendering;
98

@@ -12,15 +11,15 @@ namespace Skybrud.ImagePicker.Grid.Converters {
1211
/// <summary>
1312
/// Grid converter for the ImagePicker.
1413
/// </summary>
15-
public class ImagePickerGridConverter : IGridConverter {
14+
public class ImagePickerGridConverter : GridConverterBase {
1615

1716
/// <summary>
18-
/// Converts the specified <code>token</code> into an instance of <see cref="IGridControlValue"/>.
17+
/// Converts the specified <paramref name="token"/> into an instance of <see cref="IGridControlValue"/>.
1918
/// </summary>
2019
/// <param name="control">A reference to the parent <see cref="GridControl"/>.</param>
2120
/// <param name="token">The instance of <see cref="JToken"/> representing the control value.</param>
2221
/// <param name="value">The converted control value.</param>
23-
public bool ConvertControlValue(GridControl control, JToken token, out IGridControlValue value) {
22+
public override bool ConvertControlValue(GridControl control, JToken token, out IGridControlValue value) {
2423
value = null;
2524
if (IsImagePickerEditor(control.Editor)) {
2625
value = GridControlImagePickerValue.Parse(control, token as JObject);
@@ -29,12 +28,12 @@ public bool ConvertControlValue(GridControl control, JToken token, out IGridCont
2928
}
3029

3130
/// <summary>
32-
/// Converts the specified <code>token</code> into an instance of <see cref="IGridEditorConfig"/>.
31+
/// Converts the specified <paramref name="token"/> into an instance of <see cref="IGridEditorConfig"/>.
3332
/// </summary>
3433
/// <param name="editor">A reference to the parent <see cref="GridEditor"/>.</param>
3534
/// <param name="token">The instance of <see cref="JToken"/> representing the editor config.</param>
3635
/// <param name="config">The converted editor config.</param>
37-
public bool ConvertEditorConfig(GridEditor editor, JToken token, out IGridEditorConfig config) {
36+
public override bool ConvertEditorConfig(GridEditor editor, JToken token, out IGridEditorConfig config) {
3837
config = null;
3938
if (IsImagePickerEditor(editor)) {
4039
config = GridEditorImagePickerConfig.Parse(editor, token as JObject);
@@ -43,11 +42,11 @@ public bool ConvertEditorConfig(GridEditor editor, JToken token, out IGridEditor
4342
}
4443

4544
/// <summary>
46-
/// Gets an instance <see cref="GridControlWrapper"/> for the specified <code>control</code>.
45+
/// Gets an instance <see cref="GridControlWrapper"/> for the specified <paramref name="control"/>.
4746
/// </summary>
4847
/// <param name="control">The control to be wrapped.</param>
4948
/// <param name="wrapper">The wrapper.</param>
50-
public bool GetControlWrapper(GridControl control, out GridControlWrapper wrapper) {
49+
public override bool GetControlWrapper(GridControl control, out GridControlWrapper wrapper) {
5150
wrapper = null;
5251
if (IsImagePickerEditor(control.Editor)) {
5352
wrapper = control.GetControlWrapper<GridControlImagePickerValue, GridEditorImagePickerConfig>();

0 commit comments

Comments
 (0)