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
- OuterGlowBitmapEffect.cs
- WebResourceUtil.cs
- KoreanCalendar.cs
- StylusCaptureWithinProperty.cs
- ConsumerConnectionPointCollection.cs
- CompilationPass2Task.cs
- SqlHelper.cs
- SecurityProtocol.cs
- PackageDigitalSignatureManager.cs
- SyndicationFeed.cs
- AstTree.cs
- PipeStream.cs
- RequestFactory.cs
- MetaChildrenColumn.cs
- DbMetaDataCollectionNames.cs
- AspNetSynchronizationContext.cs
- DataPagerFieldCommandEventArgs.cs
- LookupTables.cs
- TransformedBitmap.cs
- XDRSchema.cs
- BufferedStream.cs
- PlanCompiler.cs
- comcontractssection.cs
- QueueException.cs
- FormClosedEvent.cs
- DomainUpDown.cs
- CodeTypeReferenceCollection.cs
- RegexMatch.cs
- EntityCommandCompilationException.cs
- ScriptMethodAttribute.cs
- TemplateGroupCollection.cs
- ArithmeticException.cs
- path.cs
- SessionStateContainer.cs
- HtmlToClrEventProxy.cs
- OneToOneMappingSerializer.cs
- Pair.cs
- ClientSideQueueItem.cs
- SecurityTokenTypes.cs
- TreeViewDataItemAutomationPeer.cs
- GenericQueueSurrogate.cs
- BinaryMessageEncodingBindingElement.cs
- OutputScopeManager.cs
- WebServiceEnumData.cs
- CodeBlockBuilder.cs
- InternalConfigHost.cs
- FrameworkContentElement.cs
- MissingFieldException.cs
- SoapWriter.cs
- ReceiveContextCollection.cs
- EventLevel.cs
- ObjectParameter.cs
- ScriptReference.cs
- HandleValueEditor.cs
- DataGridViewColumnDesigner.cs
- DesigntimeLicenseContextSerializer.cs
- KeysConverter.cs
- GridViewUpdateEventArgs.cs
- TableItemStyle.cs
- ProcessModelInfo.cs
- NavigationExpr.cs
- PackWebResponse.cs
- Thread.cs
- ServiceContractGenerationContext.cs
- OracleCommandBuilder.cs
- ToolStripDropTargetManager.cs
- MD5CryptoServiceProvider.cs
- documentsequencetextview.cs
- DataGridViewRowPrePaintEventArgs.cs
- ToolStripProgressBar.cs
- StrongNameIdentityPermission.cs
- Identity.cs
- TimeSpanHelper.cs
- Clock.cs
- Compilation.cs
- TextEditorParagraphs.cs
- AnnotationDocumentPaginator.cs
- SecurityState.cs
- DSACryptoServiceProvider.cs
- BitmapEffectCollection.cs
- BufferBuilder.cs
- CompositeDuplexBindingElementImporter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- _NegotiateClient.cs
- HMACSHA256.cs
- ChannelManager.cs
- DataGridTemplateColumn.cs
- ClientProxyGenerator.cs
- UIPropertyMetadata.cs
- NotifyInputEventArgs.cs
- PrintControllerWithStatusDialog.cs
- XmlObjectSerializerWriteContext.cs
- OneOfConst.cs
- XmlDomTextWriter.cs
- Rule.cs
- EmptyImpersonationContext.cs
- IPipelineRuntime.cs
- ConfigPathUtility.cs
- Avt.cs
- TransportOutputChannel.cs