Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / ValidationError.cs / 1305600 / ValidationError.cs
//---------------------------------------------------------------------------- // //// Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // // // // Description: // An error in validation -- either created by an ValidationRule // or explicitly through MarkInvalid on BindingExpression or MultiBindingExpression. // // See specs at http://avalon/connecteddata/Specs/Validation.mht // // History: // 5/3/2004 mharper: created. // //--------------------------------------------------------------------------- using System; namespace System.Windows.Controls { ////// An error in validation -- either created by an ValidationRule /// or explicitly through MarkInvalid on BindingExpression or MultiBindingExpression. /// public class ValidationError { ////// ValidationError ctor /// /// rule that detected validation error /// BindingExpression for which validation failed /// validation rule specific details to the error /// exception that caused the validation failure; optional, can be null public ValidationError(ValidationRule ruleInError, object bindingInError, object errorContent, Exception exception) { if (ruleInError == null) throw new ArgumentNullException("ruleInError"); if (bindingInError == null) throw new ArgumentNullException("bindingInError"); _ruleInError = ruleInError; _bindingInError = bindingInError; _errorContent = errorContent; _exception = exception; } ////// ValidationError ctor /// rule that detected validation error /// BindingExpression for which validation failed /// public ValidationError(ValidationRule ruleInError, object bindingInError) : this(ruleInError, bindingInError, null, null) { } ////// If the validationError is as the result of an ValidationRule, /// then this is the reference to that ValidationRule. /// public ValidationRule RuleInError { get { return _ruleInError; } set { _ruleInError = value; } } ////// Some additional context for the ValidationError, such as /// a string describing the error. /// public object ErrorContent { get { return _errorContent; } set { _errorContent = value; } } ////// If the ValidationError is the result of some Exception, /// this will be a reference to that exception. /// public Exception Exception { get { return _exception; } set { _exception = value; } } ////// The BindingExpression or MultiBindingExpression that was marked invalid /// either explicitly, or while validating the ValidationRules collection. /// public object BindingInError { get { return _bindingInError; } } private ValidationRule _ruleInError; private object _errorContent; private Exception _exception; private object _bindingInError; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // // // // Description: // An error in validation -- either created by an ValidationRule // or explicitly through MarkInvalid on BindingExpression or MultiBindingExpression. // // See specs at http://avalon/connecteddata/Specs/Validation.mht // // History: // 5/3/2004 mharper: created. // //--------------------------------------------------------------------------- using System; namespace System.Windows.Controls { ////// An error in validation -- either created by an ValidationRule /// or explicitly through MarkInvalid on BindingExpression or MultiBindingExpression. /// public class ValidationError { ////// ValidationError ctor /// /// rule that detected validation error /// BindingExpression for which validation failed /// validation rule specific details to the error /// exception that caused the validation failure; optional, can be null public ValidationError(ValidationRule ruleInError, object bindingInError, object errorContent, Exception exception) { if (ruleInError == null) throw new ArgumentNullException("ruleInError"); if (bindingInError == null) throw new ArgumentNullException("bindingInError"); _ruleInError = ruleInError; _bindingInError = bindingInError; _errorContent = errorContent; _exception = exception; } ////// ValidationError ctor /// rule that detected validation error /// BindingExpression for which validation failed /// public ValidationError(ValidationRule ruleInError, object bindingInError) : this(ruleInError, bindingInError, null, null) { } ////// If the validationError is as the result of an ValidationRule, /// then this is the reference to that ValidationRule. /// public ValidationRule RuleInError { get { return _ruleInError; } set { _ruleInError = value; } } ////// Some additional context for the ValidationError, such as /// a string describing the error. /// public object ErrorContent { get { return _errorContent; } set { _errorContent = value; } } ////// If the ValidationError is the result of some Exception, /// this will be a reference to that exception. /// public Exception Exception { get { return _exception; } set { _exception = value; } } ////// The BindingExpression or MultiBindingExpression that was marked invalid /// either explicitly, or while validating the ValidationRules collection. /// public object BindingInError { get { return _bindingInError; } } private ValidationRule _ruleInError; private object _errorContent; private Exception _exception; private object _bindingInError; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Timer.cs
- MsmqIntegrationProcessProtocolHandler.cs
- wgx_sdk_version.cs
- CheckBoxRenderer.cs
- QueueProcessor.cs
- SecurityTokenAttachmentMode.cs
- PrincipalPermission.cs
- FrameDimension.cs
- CFStream.cs
- SetStoryboardSpeedRatio.cs
- ControlCollection.cs
- XhtmlConformanceSection.cs
- ShellProvider.cs
- ContractMethodInfo.cs
- Array.cs
- X509CertificateValidator.cs
- CodePrimitiveExpression.cs
- ProfileService.cs
- EntityConnection.cs
- CompiledIdentityConstraint.cs
- DataRowExtensions.cs
- PairComparer.cs
- HtmlEmptyTagControlBuilder.cs
- CacheModeConverter.cs
- WebPartEventArgs.cs
- WebPartCollection.cs
- HostingEnvironment.cs
- SmiRequestExecutor.cs
- ControlPager.cs
- WaitHandleCannotBeOpenedException.cs
- LicenseProviderAttribute.cs
- _ServiceNameStore.cs
- RenderCapability.cs
- UserControl.cs
- ReliableChannelListener.cs
- DesignerSerializationOptionsAttribute.cs
- StackOverflowException.cs
- FocusWithinProperty.cs
- ProcessInfo.cs
- XmlAttributeAttribute.cs
- COAUTHIDENTITY.cs
- QilReplaceVisitor.cs
- ScheduleChanges.cs
- ProxyHwnd.cs
- ListViewCommandEventArgs.cs
- ButtonRenderer.cs
- BamlBinaryReader.cs
- CustomErrorsSectionWrapper.cs
- DataGridViewElement.cs
- XdrBuilder.cs
- AutomationPatternInfo.cs
- DocumentCollection.cs
- TransformerInfo.cs
- FileDetails.cs
- HotSpotCollectionEditor.cs
- TextSelectionHelper.cs
- OletxEnlistment.cs
- OutputChannelBinder.cs
- BasicExpressionVisitor.cs
- _OSSOCK.cs
- SynchronizedInputProviderWrapper.cs
- StyleHelper.cs
- NumberSubstitution.cs
- SharedStatics.cs
- DescendantBaseQuery.cs
- WebPartTracker.cs
- PositiveTimeSpanValidator.cs
- ArgumentReference.cs
- RangeBase.cs
- Matrix3DStack.cs
- DataSourceCacheDurationConverter.cs
- ImageListImageEditor.cs
- ParseHttpDate.cs
- ProcessingInstructionAction.cs
- StrokeCollection2.cs
- WebReference.cs
- SMSvcHost.cs
- ClipboardData.cs
- TextServicesManager.cs
- BindingExpression.cs
- DesignBindingPicker.cs
- CommonDialog.cs
- BroadcastEventHelper.cs
- MD5CryptoServiceProvider.cs
- FormViewInsertedEventArgs.cs
- PrinterUnitConvert.cs
- ITextView.cs
- StrongNameIdentityPermission.cs
- ValueUnavailableException.cs
- FamilyTypefaceCollection.cs
- DockProviderWrapper.cs
- HttpConfigurationSystem.cs
- XmlSchemaAll.cs
- XmlSchemaType.cs
- ControlPaint.cs
- ZipIOBlockManager.cs
- util.cs
- PolyLineSegment.cs
- COM2ComponentEditor.cs
- SafeTimerHandle.cs