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
- FilterableData.cs
- OpenTypeLayoutCache.cs
- PartitionedStream.cs
- TransformValueSerializer.cs
- NumberAction.cs
- RenderOptions.cs
- StatusBarDrawItemEvent.cs
- UnsafeNativeMethods.cs
- LinqToSqlWrapper.cs
- DetailsViewModeEventArgs.cs
- SharedDp.cs
- TextEditorThreadLocalStore.cs
- DataKeyArray.cs
- AstTree.cs
- SubclassTypeValidator.cs
- TableItemProviderWrapper.cs
- BrushMappingModeValidation.cs
- TripleDES.cs
- SiteMap.cs
- ListViewItemEventArgs.cs
- XamlGridLengthSerializer.cs
- StylusPointPropertyInfoDefaults.cs
- Pair.cs
- SecurityManager.cs
- DefaultTextStore.cs
- Simplifier.cs
- NameValuePermission.cs
- ManagementOperationWatcher.cs
- IdentityNotMappedException.cs
- TextBox.cs
- SmiContextFactory.cs
- RenamedEventArgs.cs
- Font.cs
- HttpWriter.cs
- Message.cs
- MultipleCopiesCollection.cs
- XmlProcessingInstruction.cs
- Enlistment.cs
- ExpressionValueEditor.cs
- Instrumentation.cs
- CollectionTypeElement.cs
- MethodBuilder.cs
- ImageInfo.cs
- DynamicPropertyHolder.cs
- ResourceManager.cs
- BookmarkUndoUnit.cs
- OutputWindow.cs
- WindowsListViewGroup.cs
- BaseCollection.cs
- TagPrefixInfo.cs
- BuildProvider.cs
- WindowsProgressbar.cs
- Vector3DCollectionValueSerializer.cs
- COSERVERINFO.cs
- BlockCollection.cs
- OrderedDictionaryStateHelper.cs
- Switch.cs
- NGCSerializationManagerAsync.cs
- SelectedDatesCollection.cs
- MetadataPropertyvalue.cs
- DataGridViewColumnConverter.cs
- DesignerValidatorAdapter.cs
- HtmlAnchor.cs
- Timer.cs
- SecurityTokenRequirement.cs
- cookie.cs
- TableLayoutPanelCellPosition.cs
- StoragePropertyMapping.cs
- ChannelCredentials.cs
- AsmxEndpointPickerExtension.cs
- KnowledgeBase.cs
- MarkupCompilePass2.cs
- StdValidatorsAndConverters.cs
- ComponentEditorForm.cs
- ReadOnlyHierarchicalDataSource.cs
- ListBindableAttribute.cs
- Emitter.cs
- JumpTask.cs
- CanonicalFontFamilyReference.cs
- WindowsEditBoxRange.cs
- NumberSubstitution.cs
- MatrixUtil.cs
- InvokeSchedule.cs
- CharStorage.cs
- ExitEventArgs.cs
- AstTree.cs
- XmlCodeExporter.cs
- DBSqlParser.cs
- XmlSchemaRedefine.cs
- MiniModule.cs
- CompiledXpathExpr.cs
- SpecialFolderEnumConverter.cs
- IntegerValidator.cs
- DesignerOptionService.cs
- Logging.cs
- NumberAction.cs
- PagerSettings.cs
- Block.cs
- _ProxyChain.cs
- ExtendedProperty.cs