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
- DictionaryEntry.cs
- CryptoHelper.cs
- BitmapFrameEncode.cs
- TemplateControlCodeDomTreeGenerator.cs
- DynamicFilterExpression.cs
- CompensatableTransactionScopeActivity.cs
- Blend.cs
- ProcessModelSection.cs
- DependencySource.cs
- BreakRecordTable.cs
- DataSourceCache.cs
- PeerOutputChannel.cs
- HttpVersion.cs
- KeyBinding.cs
- GradientBrush.cs
- HttpListenerResponse.cs
- ListItemCollection.cs
- BypassElement.cs
- AxisAngleRotation3D.cs
- HostUtils.cs
- TimeEnumHelper.cs
- ComponentCollection.cs
- SafeBitVector32.cs
- GetMemberBinder.cs
- CompletedAsyncResult.cs
- CacheDependency.cs
- ToolStripMenuItemDesigner.cs
- DataGridPreparingCellForEditEventArgs.cs
- SimpleTypesSurrogate.cs
- Rss20ItemFormatter.cs
- SafeRightsManagementEnvironmentHandle.cs
- ExecutionScope.cs
- DataGridViewCellStyleConverter.cs
- XmlReflectionImporter.cs
- CircleEase.cs
- ResourceDefaultValueAttribute.cs
- NegationPusher.cs
- FamilyMap.cs
- ComPersistableTypeElement.cs
- StandardToolWindows.cs
- LockedAssemblyCache.cs
- SocketPermission.cs
- DecoderExceptionFallback.cs
- PkcsUtils.cs
- HelloOperationCD1AsyncResult.cs
- Figure.cs
- HttpConfigurationContext.cs
- PostBackTrigger.cs
- EntityParameterCollection.cs
- LicenseException.cs
- ServiceControllerDesigner.cs
- SemanticBasicElement.cs
- ConstrainedDataObject.cs
- ServiceDescriptions.cs
- Errors.cs
- DataServiceStreamProviderWrapper.cs
- ToolStripControlHost.cs
- odbcmetadatacollectionnames.cs
- RegexCode.cs
- DecimalConverter.cs
- TTSEngineProxy.cs
- SuppressMessageAttribute.cs
- SmiEventSink_Default.cs
- UserInitiatedRoutedEventPermission.cs
- Converter.cs
- GraphicsContext.cs
- HostedNamedPipeTransportManager.cs
- XmlElementAttributes.cs
- TimersDescriptionAttribute.cs
- VariantWrapper.cs
- WindowsListViewGroupHelper.cs
- EndpointDiscoveryMetadataCD1.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- MailAddress.cs
- StylusSystemGestureEventArgs.cs
- ApplicationDirectory.cs
- FrameworkRichTextComposition.cs
- CheckBoxPopupAdapter.cs
- httpstaticobjectscollection.cs
- RefType.cs
- DataGridViewTextBoxCell.cs
- RelationshipConverter.cs
- AutomationIdentifier.cs
- AttributeEmitter.cs
- MostlySingletonList.cs
- Control.cs
- SimpleLine.cs
- NavigationWindowAutomationPeer.cs
- ConstNode.cs
- Brush.cs
- MsmqChannelFactoryBase.cs
- errorpatternmatcher.cs
- MULTI_QI.cs
- HttpProfileBase.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ZipArchive.cs
- WindowsListViewGroupSubsetLink.cs
- ApplicationId.cs
- MiniCustomAttributeInfo.cs
- BrowserCapabilitiesCodeGenerator.cs