private void DealWithSetValueException(ExtendedTypeSystemException e, out bool shouldThrow)
 {
     SettingValueExceptionEventArgs eventArgs = new SettingValueExceptionEventArgs(e);
     if (this.SettingValueException != null)
     {
         this.SettingValueException.SafeInvoke<SettingValueExceptionEventArgs>(this, eventArgs);
         PSObjectTypeDescriptor.typeDescriptor.WriteLine("SettingValueException event has been triggered resulting in ShouldThrow:\"{0}\".", new object[] { eventArgs.ShouldThrow });
     }
     shouldThrow = eventArgs.ShouldThrow;
 }
Example #2
0
        private void DealWithSetValueException(ExtendedTypeSystemException e, out bool shouldThrow)
        {
            SettingValueExceptionEventArgs e1 = new SettingValueExceptionEventArgs((Exception)e);

            if (this.SettingValueException != null)
            {
                this.SettingValueException((object)this, e1);
                PSObjectTypeDescriptor.typeDescriptor.WriteLine("SettingValueException event has been triggered resulting in ShouldThrow:\"{0}\".", (object)e1.ShouldThrow);
            }
            shouldThrow = e1.ShouldThrow;
        }
        private void DealWithSetValueException(ExtendedTypeSystemException e, out bool shouldThrow)
        {
            SettingValueExceptionEventArgs eventArgs = new SettingValueExceptionEventArgs(e);

            if (this.SettingValueException != null)
            {
                this.SettingValueException.SafeInvoke <SettingValueExceptionEventArgs>(this, eventArgs);
                PSObjectTypeDescriptor.typeDescriptor.WriteLine("SettingValueException event has been triggered resulting in ShouldThrow:\"{0}\".", new object[] { eventArgs.ShouldThrow });
            }
            shouldThrow = eventArgs.ShouldThrow;
        }