Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / ValidationError.cs / 1305600 / 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
- RootCodeDomSerializer.cs
- ExpressionTextBox.xaml.cs
- ArrayConverter.cs
- WebServiceParameterData.cs
- VisualCollection.cs
- ViewManagerAttribute.cs
- Root.cs
- WebPartTracker.cs
- EdmConstants.cs
- Double.cs
- BinaryOperationBinder.cs
- TraceLevelHelper.cs
- PrintPreviewControl.cs
- UnsafeNativeMethods.cs
- PresentationTraceSources.cs
- WebBrowser.cs
- NativeActivity.cs
- ZipIOExtraFieldPaddingElement.cs
- SqlFunctions.cs
- XmlBinaryReader.cs
- DataSourceControlBuilder.cs
- XmlSchemaGroup.cs
- SqlCacheDependencySection.cs
- ClassicBorderDecorator.cs
- FontStyle.cs
- ExpanderAutomationPeer.cs
- WindowsListViewGroupHelper.cs
- AsymmetricSignatureFormatter.cs
- ContentFileHelper.cs
- RandomNumberGenerator.cs
- HtmlInputPassword.cs
- OneOfTypeConst.cs
- PartialArray.cs
- SqlConnectionFactory.cs
- DataRelation.cs
- XmlSignatureProperties.cs
- DoubleUtil.cs
- DataGridViewComboBoxColumn.cs
- MasterPageParser.cs
- RenderingEventArgs.cs
- AttributeEmitter.cs
- StateChangeEvent.cs
- LocatorBase.cs
- StringKeyFrameCollection.cs
- NamedElement.cs
- RetrieveVirtualItemEventArgs.cs
- HMACSHA512.cs
- LateBoundChannelParameterCollection.cs
- InputGestureCollection.cs
- SystemWebCachingSectionGroup.cs
- MappingModelBuildProvider.cs
- AsymmetricKeyExchangeDeformatter.cs
- OleDbMetaDataFactory.cs
- LinearGradientBrush.cs
- CompilerGeneratedAttribute.cs
- ValidationVisibilityAttribute.cs
- ParameterInfo.cs
- PersonalizationStateQuery.cs
- XmlSchemaProviderAttribute.cs
- SchemaImporterExtension.cs
- EntityDataSourceReferenceGroup.cs
- WpfSharedBamlSchemaContext.cs
- SerializationHelper.cs
- AnnotationResourceChangedEventArgs.cs
- XmlSchemaImporter.cs
- TextDecorationLocationValidation.cs
- DebugView.cs
- SqlCrossApplyToCrossJoin.cs
- BoolExpr.cs
- Panel.cs
- KeySplineConverter.cs
- MarkerProperties.cs
- EdmComplexTypeAttribute.cs
- CapabilitiesSection.cs
- OciHandle.cs
- DesignerWidgets.cs
- ValidationErrorCollection.cs
- HttpRuntime.cs
- ProviderSettingsCollection.cs
- MemberProjectionIndex.cs
- BitmapPalette.cs
- ComponentResourceKey.cs
- AnimationException.cs
- Matrix3DValueSerializer.cs
- RegexFCD.cs
- EncodingTable.cs
- MouseGestureValueSerializer.cs
- MessagePropertyVariants.cs
- RoleManagerModule.cs
- AttachedPropertyDescriptor.cs
- Int64AnimationBase.cs
- WindowShowOrOpenTracker.cs
- DataBindingHandlerAttribute.cs
- ResolveResponseInfo.cs
- PerfCounterSection.cs
- TemplateControlCodeDomTreeGenerator.cs
- Directory.cs
- ObjectParameter.cs
- ContextActivityUtils.cs
- _NativeSSPI.cs