@@ -229,6 +229,9 @@ public string Name {
229
229
/// <exception cref='InvalidOperationException'>
230
230
/// Is thrown when trying to set a value on a read-only ObjectValue
231
231
/// </exception>
232
+ /// <exception cref="ValueModificationException">
233
+ /// When value settings was failed. This exception should be shown to user.
234
+ /// </exception>
232
235
/// <remarks>
233
236
/// This value is a string representation of the ObjectValue. The content depends on several evaluation
234
237
/// options. For example, if ToString calls are enabled, this value will be the result of calling
@@ -238,20 +241,13 @@ public string Name {
238
241
/// will include the quotation marks and chars like '\' will be properly escaped.
239
242
/// If you need to get the real CLR value of the object, use GetRawValue.
240
243
/// </remarks>
244
+ /// <seealso cref="IObjectValueSource.SetValue"/>
241
245
public virtual string Value {
242
246
get {
243
247
return value ;
244
248
}
245
249
set {
246
- if ( IsReadOnly || source == null )
247
- throw new InvalidOperationException ( "Value is not editable" ) ;
248
-
249
- EvaluationResult res = source . SetValue ( path , value , null ) ;
250
- if ( res != null ) {
251
- this . value = res . Value ;
252
- displayValue = res . DisplayValue ;
253
- isNull = value == null ;
254
- }
250
+ SetValue ( value ) ;
255
251
}
256
252
}
257
253
@@ -291,6 +287,10 @@ public void SetValue (string value)
291
287
/// <exception cref='InvalidOperationException'>
292
288
/// Is thrown if the value is read-only
293
289
/// </exception>
290
+ /// <exception cref="ValueModificationException">
291
+ /// When value settings was failed. This exception should be shown to user.
292
+ /// </exception>
293
+ /// <seealso cref="IObjectValueSource.SetValue"/>
294
294
public void SetValue ( string value , EvaluationOptions options )
295
295
{
296
296
if ( IsReadOnly || source == null )
@@ -299,6 +299,7 @@ public void SetValue (string value, EvaluationOptions options)
299
299
if ( res != null ) {
300
300
this . value = res . Value ;
301
301
displayValue = res . DisplayValue ;
302
+ isNull = value == null ;
302
303
}
303
304
}
304
305
0 commit comments