Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Controls / ValidationError.cs / 1 / 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
- TableHeaderCell.cs
- XmlSchemaAttribute.cs
- SchemaNotation.cs
- ConfigurationValue.cs
- TextBox.cs
- DocumentOutline.cs
- StylusPointPropertyId.cs
- IItemContainerGenerator.cs
- XmlDataSourceView.cs
- WeakReferenceEnumerator.cs
- Pen.cs
- ResXResourceWriter.cs
- CallbackHandler.cs
- ValidationErrorCollection.cs
- SystemUdpStatistics.cs
- ToolStripItemDataObject.cs
- XmlCodeExporter.cs
- TdsParserStateObject.cs
- RawMouseInputReport.cs
- SelectionGlyphBase.cs
- SqlTriggerAttribute.cs
- EncryptedPackageFilter.cs
- WCFServiceClientProxyGenerator.cs
- PasswordDeriveBytes.cs
- DirtyTextRange.cs
- UserNameSecurityTokenProvider.cs
- ResXBuildProvider.cs
- InternalEnumValidatorAttribute.cs
- Html32TextWriter.cs
- ScrollBar.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- EntityDataSourceValidationException.cs
- StylusPointPropertyInfoDefaults.cs
- IRCollection.cs
- DataControlField.cs
- KeyConverter.cs
- GlobalId.cs
- ProfileGroupSettings.cs
- ProfileGroupSettings.cs
- ListControl.cs
- ModelTreeEnumerator.cs
- BlobPersonalizationState.cs
- FixUp.cs
- ComEventsSink.cs
- AttributeCollection.cs
- QuotaThrottle.cs
- LowerCaseStringConverter.cs
- HtmlAnchor.cs
- DocumentApplicationJournalEntry.cs
- ManualResetEvent.cs
- ApplicationManager.cs
- SemaphoreFullException.cs
- SwitchElementsCollection.cs
- QuotedStringWriteStateInfo.cs
- XmlAttributeCollection.cs
- PageCatalogPartDesigner.cs
- UxThemeWrapper.cs
- PageContentCollection.cs
- DiscoveryUtility.cs
- log.cs
- NotSupportedException.cs
- MouseDevice.cs
- SqlDataSourceStatusEventArgs.cs
- ObjectItemCollection.cs
- SessionStateContainer.cs
- ArrayTypeMismatchException.cs
- backend.cs
- AdjustableArrowCap.cs
- TlsnegoTokenAuthenticator.cs
- OrderedDictionary.cs
- CollectionEditorDialog.cs
- CodeEntryPointMethod.cs
- PropertyTabAttribute.cs
- HtmlImage.cs
- ContentType.cs
- CheckBox.cs
- Empty.cs
- DbConnectionPoolCounters.cs
- SkinBuilder.cs
- AttachInfo.cs
- SafeRegistryHandle.cs
- PEFileReader.cs
- OleDbRowUpdatedEvent.cs
- DataServiceKeyAttribute.cs
- SmtpMail.cs
- CodeAccessSecurityEngine.cs
- StringAttributeCollection.cs
- CompilationRelaxations.cs
- EnumUnknown.cs
- FixedLineResult.cs
- XmlSchemaDatatype.cs
- VirtualPathProvider.cs
- ExpressionConverter.cs
- ScriptRegistrationManager.cs
- DbDataRecord.cs
- TextSelectionHighlightLayer.cs
- WebHttpSecurityElement.cs
- ExpandableObjectConverter.cs
- OperandQuery.cs
- WindowCollection.cs