Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- UnmanagedMarshal.cs
- Item.cs
- ThreadStaticAttribute.cs
- ExtensionQuery.cs
- ReverseInheritProperty.cs
- TrackingProfileDeserializationException.cs
- WindowsStreamSecurityUpgradeProvider.cs
- ToolStripItem.cs
- log.cs
- MetafileHeader.cs
- CachedBitmap.cs
- GetWinFXPath.cs
- CodeTypeReferenceExpression.cs
- TextChangedEventArgs.cs
- EmbossBitmapEffect.cs
- FormsAuthenticationModule.cs
- VirtualPathUtility.cs
- CustomExpressionEventArgs.cs
- RelatedImageListAttribute.cs
- TreeNodeMouseHoverEvent.cs
- AppSettingsSection.cs
- ErrorWebPart.cs
- DataGridClipboardHelper.cs
- OleDbException.cs
- TypeGeneratedEventArgs.cs
- SmiEventStream.cs
- CodeTypeReferenceExpression.cs
- LineGeometry.cs
- SplitterCancelEvent.cs
- FramingDecoders.cs
- PingOptions.cs
- Latin1Encoding.cs
- CompositeDataBoundControl.cs
- InitializerFacet.cs
- SelectionRangeConverter.cs
- SectionInformation.cs
- LOSFormatter.cs
- WebBrowserContainer.cs
- EncryptionUtility.cs
- ViewManager.cs
- CellLabel.cs
- Grant.cs
- MonthChangedEventArgs.cs
- PerformanceCounter.cs
- FunctionDescription.cs
- FileSystemInfo.cs
- WorkItem.cs
- Vector3D.cs
- SizeF.cs
- RIPEMD160Managed.cs
- TextBox.cs
- ArrayWithOffset.cs
- addressfiltermode.cs
- LassoHelper.cs
- ParallelEnumerableWrapper.cs
- CodeAccessPermission.cs
- MarshalDirectiveException.cs
- WebEventCodes.cs
- EntityObject.cs
- Predicate.cs
- SqlLiftWhereClauses.cs
- StickyNoteHelper.cs
- ActiveXSite.cs
- CollectionDataContract.cs
- MobileUITypeEditor.cs
- PathGeometry.cs
- SimpleNameService.cs
- PriorityBinding.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ProgressBarHighlightConverter.cs
- StandardToolWindows.cs
- _Events.cs
- XsltLibrary.cs
- TdsEnums.cs
- CalloutQueueItem.cs
- _ListenerRequestStream.cs
- FileSystemWatcher.cs
- MouseActionConverter.cs
- XsltConvert.cs
- MatrixValueSerializer.cs
- FastPropertyAccessor.cs
- DragDrop.cs
- DetailsViewInsertEventArgs.cs
- ElementsClipboardData.cs
- InstanceLockedException.cs
- TextShapeableCharacters.cs
- WindowsStatic.cs
- BuildManager.cs
- BaseCAMarshaler.cs
- LineGeometry.cs
- ProxyGenerator.cs
- SchemaElementLookUpTable.cs
- GeometryCombineModeValidation.cs
- TextEffect.cs
- ByteStack.cs
- FaultContractAttribute.cs
- TypedTableBaseExtensions.cs
- CompensatableTransactionScopeActivityDesigner.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- XmlLoader.cs