private object DealWithGetValueException(ExtendedTypeSystemException e, out bool shouldThrow) { GettingValueExceptionEventArgs eventArgs = new GettingValueExceptionEventArgs(e); if (this.GettingValueException != null) { this.GettingValueException.SafeInvoke<GettingValueExceptionEventArgs>(this, eventArgs); PSObjectTypeDescriptor.typeDescriptor.WriteLine("GettingValueException event has been triggered resulting in ValueReplacement:\"{0}\".", new object[] { eventArgs.ValueReplacement }); } shouldThrow = eventArgs.ShouldThrow; return eventArgs.ValueReplacement; }
private object DealWithGetValueException(ExtendedTypeSystemException e, out bool shouldThrow) { GettingValueExceptionEventArgs e1 = new GettingValueExceptionEventArgs((Exception)e); if (this.GettingValueException != null) { this.GettingValueException((object)this, e1); PSObjectTypeDescriptor.typeDescriptor.WriteLine("GettingValueException event has been triggered resulting in ValueReplacement:\"{0}\".", e1.ValueReplacement); } shouldThrow = e1.ShouldThrow; return(e1.ValueReplacement); }
private object DealWithGetValueException(ExtendedTypeSystemException e, out bool shouldThrow) { GettingValueExceptionEventArgs eventArgs = new GettingValueExceptionEventArgs(e); if (this.GettingValueException != null) { this.GettingValueException.SafeInvoke <GettingValueExceptionEventArgs>(this, eventArgs); PSObjectTypeDescriptor.typeDescriptor.WriteLine("GettingValueException event has been triggered resulting in ValueReplacement:\"{0}\".", new object[] { eventArgs.ValueReplacement }); } shouldThrow = eventArgs.ShouldThrow; return(eventArgs.ValueReplacement); }