Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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 [....]/connecteddata/Specs/Validation.mht // // History: // 5/3/2004 [....]: 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
- PropertyItemInternal.cs
- HttpGetProtocolImporter.cs
- WebCategoryAttribute.cs
- ToolStripContainerDesigner.cs
- ZipFileInfoCollection.cs
- DPCustomTypeDescriptor.cs
- ProviderMetadata.cs
- ScriptHandlerFactory.cs
- PngBitmapDecoder.cs
- ResetableIterator.cs
- ScrollBarAutomationPeer.cs
- CompiledRegexRunnerFactory.cs
- DocumentScope.cs
- ClientEventManager.cs
- DbConnectionInternal.cs
- SqlWorkflowPersistenceService.cs
- SortableBindingList.cs
- BamlStream.cs
- TextServicesContext.cs
- OperationResponse.cs
- HttpFileCollection.cs
- TranslateTransform3D.cs
- InternalTypeHelper.cs
- SaveFileDialogDesigner.cs
- ClientApiGenerator.cs
- OleDbRowUpdatedEvent.cs
- DataRowCollection.cs
- URI.cs
- ButtonChrome.cs
- ColorConvertedBitmap.cs
- FileSystemInfo.cs
- SecurityContext.cs
- SafePointer.cs
- ListViewGroupItemCollection.cs
- OdbcException.cs
- HtmlTitle.cs
- ToolBarOverflowPanel.cs
- EntityDataSourceView.cs
- DataGridLength.cs
- Control.cs
- HwndSource.cs
- ConsoleCancelEventArgs.cs
- CfgParser.cs
- PropertyKey.cs
- DetailsView.cs
- EntityViewGenerationConstants.cs
- SpotLight.cs
- CommandSet.cs
- AuthenticationServiceManager.cs
- EntityDataSourceContextCreatedEventArgs.cs
- Attributes.cs
- Identifier.cs
- ShapeTypeface.cs
- ElapsedEventArgs.cs
- TextBox.cs
- TableLayoutPanelBehavior.cs
- PropertyInformation.cs
- BreakRecordTable.cs
- ExternalCalls.cs
- IItemProperties.cs
- ReadOnlyHierarchicalDataSourceView.cs
- PageBreakRecord.cs
- WebRequestModuleElement.cs
- Pkcs7Signer.cs
- GorillaCodec.cs
- Content.cs
- OdbcEnvironment.cs
- EastAsianLunisolarCalendar.cs
- PropertyEmitter.cs
- EdmMember.cs
- Trigger.cs
- CompositeDispatchFormatter.cs
- SmtpFailedRecipientException.cs
- FragmentNavigationEventArgs.cs
- Base64WriteStateInfo.cs
- DBPropSet.cs
- ErasingStroke.cs
- GridViewPageEventArgs.cs
- COM2EnumConverter.cs
- ImageConverter.cs
- CombinedGeometry.cs
- TypographyProperties.cs
- EventDescriptor.cs
- JsonCollectionDataContract.cs
- MouseEventArgs.cs
- NameValueFileSectionHandler.cs
- CacheEntry.cs
- DebugController.cs
- SpecialFolderEnumConverter.cs
- SerialReceived.cs
- XpsPartBase.cs
- ParenthesizePropertyNameAttribute.cs
- SqlBulkCopyColumnMapping.cs
- _OverlappedAsyncResult.cs
- MaskedTextBox.cs
- SrgsRulesCollection.cs
- NativeRecognizer.cs
- AccessedThroughPropertyAttribute.cs
- FormViewDeleteEventArgs.cs
- WebContentFormatHelper.cs