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
- SimpleExpression.cs
- BaseEntityWrapper.cs
- SiteMapNodeItemEventArgs.cs
- SystemNetHelpers.cs
- CompletedAsyncResult.cs
- FixedDocumentSequencePaginator.cs
- SystemIcmpV6Statistics.cs
- SqlMethods.cs
- SuppressMessageAttribute.cs
- AccessibleObject.cs
- ChildrenQuery.cs
- DesignerSerializationOptionsAttribute.cs
- HttpListener.cs
- WindowsListBox.cs
- TextRangeAdaptor.cs
- ImageListImageEditor.cs
- DbDataReader.cs
- URLString.cs
- RequestCacheEntry.cs
- LinearGradientBrush.cs
- DiagnosticsElement.cs
- TraversalRequest.cs
- DBSchemaTable.cs
- CmsInterop.cs
- StrokeFIndices.cs
- PathSegmentCollection.cs
- OpCellTreeNode.cs
- WorkflowMarkupSerializationManager.cs
- ForEachAction.cs
- XNodeValidator.cs
- MenuItem.cs
- RoleManagerModule.cs
- SpoolingTask.cs
- TemplateBindingExtensionConverter.cs
- Row.cs
- AdRotator.cs
- OrderedEnumerableRowCollection.cs
- IpcManager.cs
- ObjectDataSourceView.cs
- MessageQueuePermissionEntry.cs
- StyleTypedPropertyAttribute.cs
- Inflater.cs
- PeerContact.cs
- InputScopeAttribute.cs
- SecurityManager.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ParameterCollection.cs
- localization.cs
- QueryPageSettingsEventArgs.cs
- MarkerProperties.cs
- AssemblyBuilderData.cs
- XhtmlConformanceSection.cs
- TextDecoration.cs
- RTLAwareMessageBox.cs
- XamlWriter.cs
- parserscommon.cs
- Monitor.cs
- JournalEntry.cs
- _HeaderInfoTable.cs
- ToolStripRendererSwitcher.cs
- Path.cs
- ACL.cs
- NodeCounter.cs
- ControlCachePolicy.cs
- WindowsTitleBar.cs
- PartitionResolver.cs
- ValidateNames.cs
- AnnotationMap.cs
- CursorConverter.cs
- NativeMethods.cs
- DataSourceConverter.cs
- ShaperBuffers.cs
- SoundPlayerAction.cs
- ObjectDisposedException.cs
- Size.cs
- PartitionResolver.cs
- ClientSession.cs
- PanelContainerDesigner.cs
- LinkArea.cs
- FileVersion.cs
- CodeVariableDeclarationStatement.cs
- _CommandStream.cs
- ObjectContextServiceProvider.cs
- PrivilegeNotHeldException.cs
- DataTransferEventArgs.cs
- EntityViewGenerationAttribute.cs
- IProvider.cs
- ObjectListCommandsPage.cs
- EnumerableCollectionView.cs
- Visual3D.cs
- DbDataRecord.cs
- LinqToSqlWrapper.cs
- IntegerValidatorAttribute.cs
- HttpFileCollectionBase.cs
- SendKeys.cs
- SQLInt64Storage.cs
- PerformanceCounterTraceRecord.cs
- SafeThemeHandle.cs
- Transform3DGroup.cs
- DbProviderManifest.cs