Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlTriggerAttribute.cs
- ConnectionStringSettingsCollection.cs
- SaveFileDialog.cs
- GridItemPatternIdentifiers.cs
- ActivityExecutionContextCollection.cs
- EmbeddedObject.cs
- XmlEncodedRawTextWriter.cs
- XmlNodeChangedEventManager.cs
- CallContext.cs
- QilDataSource.cs
- CodeAttributeArgumentCollection.cs
- EventSinkActivity.cs
- RequestCacheValidator.cs
- RelationshipDetailsRow.cs
- XDeferredAxisSource.cs
- Compiler.cs
- EdmTypeAttribute.cs
- RelatedCurrencyManager.cs
- ServiceModelSectionGroup.cs
- Panel.cs
- DetailsViewPageEventArgs.cs
- SignedInfo.cs
- Effect.cs
- ConfigXmlReader.cs
- ManagementObject.cs
- ThreadAttributes.cs
- PageCatalogPart.cs
- XmlObjectSerializerWriteContext.cs
- Roles.cs
- SchemaNotation.cs
- TreeNodeClickEventArgs.cs
- SqlBulkCopy.cs
- PathStreamGeometryContext.cs
- DataGridColumn.cs
- Application.cs
- X500Name.cs
- RefExpr.cs
- FileUpload.cs
- SpecialTypeDataContract.cs
- xml.cs
- Message.cs
- AsymmetricKeyExchangeDeformatter.cs
- LayoutTableCell.cs
- DelegatingTypeDescriptionProvider.cs
- GAC.cs
- ProcessRequestArgs.cs
- TaskExtensions.cs
- SafeRegistryHandle.cs
- SubpageParaClient.cs
- DefaultProxySection.cs
- PerfCounters.cs
- CipherData.cs
- RequestCacheManager.cs
- TemplateBuilder.cs
- RbTree.cs
- IdentityManager.cs
- SqlNotificationEventArgs.cs
- HotSpotCollection.cs
- FilterEventArgs.cs
- TextTrailingWordEllipsis.cs
- DelegatingHeader.cs
- BitmapEffectGroup.cs
- XmlSortKeyAccumulator.cs
- AssemblyNameProxy.cs
- EntityTypeEmitter.cs
- AssemblyName.cs
- WebPartConnectionsDisconnectVerb.cs
- HyperLinkField.cs
- LabelDesigner.cs
- PriorityRange.cs
- SelectingProviderEventArgs.cs
- EpmAttributeNameBuilder.cs
- _AuthenticationState.cs
- ActionMessageFilterTable.cs
- SizeKeyFrameCollection.cs
- UnsafePeerToPeerMethods.cs
- DataGridBoolColumn.cs
- XPathQueryGenerator.cs
- XmlFormatReaderGenerator.cs
- ActivityScheduledQuery.cs
- DrawListViewSubItemEventArgs.cs
- ConfigurationManagerInternal.cs
- XPathNavigatorReader.cs
- DoubleAnimationUsingKeyFrames.cs
- EventWaitHandle.cs
- DefaultWorkflowTransactionService.cs
- InheritanceUI.cs
- _Events.cs
- JavaScriptObjectDeserializer.cs
- SubclassTypeValidatorAttribute.cs
- MD5CryptoServiceProvider.cs
- CompilerErrorCollection.cs
- RepeaterItemCollection.cs
- ParallelTimeline.cs
- DateTimePicker.cs
- EventHandlersStore.cs
- AddInAttribute.cs
- AssemblyEvidenceFactory.cs
- TreeNodeClickEventArgs.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs