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
- PermissionSet.cs
- CapabilitiesRule.cs
- CopyNamespacesAction.cs
- XamlToRtfWriter.cs
- DataGridViewToolTip.cs
- ListView.cs
- TypedElement.cs
- Calendar.cs
- AssemblyCollection.cs
- Point3DConverter.cs
- ProfileEventArgs.cs
- SafeArrayTypeMismatchException.cs
- InArgumentConverter.cs
- Symbol.cs
- Utils.cs
- dbenumerator.cs
- MD5HashHelper.cs
- newinstructionaction.cs
- Column.cs
- HotCommands.cs
- ReferencedType.cs
- LocatorManager.cs
- TdsRecordBufferSetter.cs
- AsyncResult.cs
- Package.cs
- ContourSegment.cs
- SocketAddress.cs
- ServiceOperationUIEditor.cs
- PrinterUnitConvert.cs
- StreamGeometry.cs
- FloaterBaseParagraph.cs
- OrderedHashRepartitionStream.cs
- IsolatedStorage.cs
- WebFaultClientMessageInspector.cs
- CodeEntryPointMethod.cs
- DragSelectionMessageFilter.cs
- RTLAwareMessageBox.cs
- DataRelation.cs
- DetailsViewPageEventArgs.cs
- TypedColumnHandler.cs
- PointKeyFrameCollection.cs
- WindowsTitleBar.cs
- Visual3DCollection.cs
- WebConfigurationFileMap.cs
- CodeThrowExceptionStatement.cs
- DiscoveryOperationContextExtension.cs
- PropertyEmitter.cs
- ListQueryResults.cs
- SerializationInfo.cs
- SyntaxCheck.cs
- LocationEnvironment.cs
- BindingCollectionElement.cs
- ServiceReference.cs
- XmlSchemaElement.cs
- NativeMethods.cs
- CodeTypeReferenceCollection.cs
- ConfigViewGenerator.cs
- ParameterExpression.cs
- DisplayInformation.cs
- RemoteHelper.cs
- DataGridTextBox.cs
- EmbeddedMailObjectsCollection.cs
- FactoryRecord.cs
- XmlSchemaElement.cs
- ObjectCloneHelper.cs
- NavigationEventArgs.cs
- TextLineResult.cs
- RpcCryptoContext.cs
- XmlNodeChangedEventManager.cs
- FormsAuthenticationCredentials.cs
- TextProviderWrapper.cs
- CollectionChangedEventManager.cs
- WebControlAdapter.cs
- ThreadWorkerController.cs
- TreePrinter.cs
- XmlElementAttributes.cs
- CharacterBufferReference.cs
- WindowsListView.cs
- BitmapEffectrendercontext.cs
- RequestResizeEvent.cs
- IisTraceListener.cs
- ToolConsole.cs
- FileResponseElement.cs
- CollectionBuilder.cs
- DataGridViewIntLinkedList.cs
- hebrewshape.cs
- TrailingSpaceComparer.cs
- ConfigurationErrorsException.cs
- CompilerResults.cs
- DoubleLinkList.cs
- OperationAbortedException.cs
- TransactionContextValidator.cs
- AssemblyInfo.cs
- SubqueryRules.cs
- MobileControlsSection.cs
- _ListenerResponseStream.cs
- LayoutEvent.cs
- SystemResources.cs
- SqlFunctionAttribute.cs
- RequiredAttributeAttribute.cs