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
- CodeCommentStatement.cs
- DataPagerFieldItem.cs
- LinkButton.cs
- PageRanges.cs
- ElapsedEventArgs.cs
- ToolboxItemAttribute.cs
- RegexWriter.cs
- TemplateBaseAction.cs
- RootBrowserWindowProxy.cs
- ConvertEvent.cs
- CAGDesigner.cs
- GeometryModel3D.cs
- xmlsaver.cs
- TemplateColumn.cs
- SelectionPattern.cs
- EmptyQuery.cs
- DataControlHelper.cs
- TextRenderer.cs
- FixedSOMTextRun.cs
- BackStopAuthenticationModule.cs
- EmptyReadOnlyDictionaryInternal.cs
- FormClosingEvent.cs
- StrongNamePublicKeyBlob.cs
- diagnosticsswitches.cs
- WinFormsComponentEditor.cs
- ResourceManagerWrapper.cs
- CodeTypeParameter.cs
- ExpandButtonVisibilityConverter.cs
- QueryResponse.cs
- EmulateRecognizeCompletedEventArgs.cs
- ObjectDataSource.cs
- SrgsRule.cs
- ScrollPattern.cs
- Int64Storage.cs
- PublisherIdentityPermission.cs
- InvalidPrinterException.cs
- QueryConverter.cs
- XMLSchema.cs
- XamlSerializationHelper.cs
- SafeLibraryHandle.cs
- NGCUIElementCollectionSerializerAsync.cs
- TemplatePropertyEntry.cs
- MouseEvent.cs
- RelatedCurrencyManager.cs
- DocumentGridPage.cs
- EntityDataSourceWrapper.cs
- Hashtable.cs
- CookieHandler.cs
- MSAAEventDispatcher.cs
- ValidatingReaderNodeData.cs
- ColumnHeader.cs
- ResXResourceReader.cs
- FileDialog_Vista.cs
- DataGridViewButtonCell.cs
- SystemTcpConnection.cs
- Content.cs
- EventLogRecord.cs
- ClassData.cs
- CommandHelpers.cs
- ModuleConfigurationInfo.cs
- PathGeometry.cs
- CoTaskMemSafeHandle.cs
- CallbackException.cs
- AlignmentYValidation.cs
- EnvironmentPermission.cs
- Splitter.cs
- StrongNameHelpers.cs
- PermissionSetTriple.cs
- ScriptManager.cs
- StatusInfoItem.cs
- CommandDevice.cs
- PropertySegmentSerializationProvider.cs
- RefreshPropertiesAttribute.cs
- CollectionType.cs
- TemplateControlParser.cs
- DataGridColumnFloatingHeader.cs
- WindowPatternIdentifiers.cs
- SrgsElementList.cs
- ObsoleteAttribute.cs
- WebHttpElement.cs
- PrimarySelectionGlyph.cs
- CustomAttribute.cs
- UIElementAutomationPeer.cs
- DataObject.cs
- Style.cs
- ControlCachePolicy.cs
- Baml2006Reader.cs
- DefaultPropertyAttribute.cs
- documentsequencetextpointer.cs
- WebSysDefaultValueAttribute.cs
- XmlImplementation.cs
- HttpWebRequestElement.cs
- DrawingContextDrawingContextWalker.cs
- EncryptedType.cs
- JsonClassDataContract.cs
- CultureInfo.cs
- DateTimeStorage.cs
- PerformanceCountersElement.cs
- WindowInteractionStateTracker.cs
- UriWriter.cs