Beispiel #1
0
 internal void ReportGetValueError(int k, object item, Exception ex)
 {
     if (TraceData.IsEnabled)
     {
         SourceValueInfo svi        = PW.GetSourceValueInfo(k);
         Type            type       = PW.GetType(k);
         string          parentName = (k > 0)? PW.GetSourceValueInfo(k - 1).name : String.Empty;
         TraceData.Trace(ParentBindingExpression.TraceLevel,
                         TraceData.CannotGetClrRawValue(
                             svi.propertyName, type.Name,
                             parentName, AvTrace.TypeName(item)),
                         ParentBindingExpression, ex);
     }
 }
Beispiel #2
0
 internal void ReportSetValueError(int k, object item, object value, Exception ex)
 {
     if (TraceData.IsEnabled)
     {
         SourceValueInfo svi  = PW.GetSourceValueInfo(k);
         Type            type = PW.GetType(k);
         TraceData.Trace(TraceEventType.Error,
                         TraceData.CannotSetClrRawValue(
                             svi.propertyName, type.Name,
                             AvTrace.TypeName(item),
                             AvTrace.ToStringHelper(value),
                             AvTrace.TypeName(value)),
                         ParentBindingExpression, ex);
     }
 }