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
//ensure these are nullable so we can return a null if required
207
+
// Ensure these are nullable so we can return a null if required
190
208
valueType=typeof(decimal?);
191
209
break;
192
210
193
211
caseValueStorageType.Date:
194
-
//ensure these are nullable so we can return a null if required
212
+
// Ensure these are nullable so we can return a null if required
195
213
valueType=typeof(DateTime?);
196
214
break;
215
+
197
216
default:
198
-
thrownewArgumentOutOfRangeException();
217
+
thrownewArgumentOutOfRangeException("ValueType was out of range.");
199
218
}
200
219
201
220
returnvalue.TryConvertTo(valueType);
202
221
}
203
222
204
-
/// <summary>
205
-
/// A method to deserialize the string value that has been saved in the content editor
206
-
/// to an object to be stored in the database.
207
-
/// </summary>
208
-
/// <param name="editorValue"></param>
209
-
/// <param name="currentValue">
210
-
/// The current value that has been persisted to the database for this editor. This value may be useful for
211
-
/// how the value then get's deserialized again to be re-persisted. In most cases it will probably not be used.
212
-
/// </param>
213
-
/// <param name="languageId"></param>
214
-
/// <param name="segment"></param>
215
-
/// <returns></returns>
216
-
/// <remarks>
217
-
/// By default this will attempt to automatically convert the string value to the value type supplied by ValueType.
218
-
///
219
-
/// If overridden then the object returned must match the type supplied in the ValueType, otherwise persisting the
220
-
/// value to the DB will fail when it tries to validate the value type.
221
-
/// </remarks>
223
+
/// <summary>
224
+
/// A method to deserialize the string value that has been saved in the content editor to an object to be stored in the database.
225
+
/// </summary>
226
+
/// <param name="editorValue">The value returned by the editor.</param>
227
+
/// <param name="currentValue">The current value that has been persisted to the database for this editor. This value may be useful for how the value then get's deserialized again to be re-persisted. In most cases it will probably not be used.</param>
228
+
/// <returns>The value that gets persisted to the database.</returns>
229
+
/// <remarks>
230
+
/// By default this will attempt to automatically convert the string value to the value type supplied by ValueType.
231
+
/// If overridden then the object returned must match the type supplied in the ValueType, otherwise persisting the
232
+
/// value to the DB will fail when it tries to validate the value type.
0 commit comments