Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbProviderConfigurationHandler.cs
- CommentAction.cs
- NullableDecimalAverageAggregationOperator.cs
- CompilerHelpers.cs
- objectresult_tresulttype.cs
- ExpressionBuilderContext.cs
- XPathSingletonIterator.cs
- QueryGeneratorBase.cs
- ScalarType.cs
- ISAPIWorkerRequest.cs
- SystemIPGlobalProperties.cs
- ComPersistableTypeElement.cs
- SendingRequestEventArgs.cs
- ToolStripOverflowButton.cs
- ContextInformation.cs
- IHttpResponseInternal.cs
- OLEDB_Util.cs
- TextRangeProviderWrapper.cs
- ProgressiveCrcCalculatingStream.cs
- PersonalizationProviderHelper.cs
- EncodingInfo.cs
- HMACSHA384.cs
- BoundColumn.cs
- BaseWebProxyFinder.cs
- ThemeInfoAttribute.cs
- FixUp.cs
- Image.cs
- HasActivatableWorkflowEvent.cs
- InputBuffer.cs
- SkewTransform.cs
- WhitespaceSignificantCollectionAttribute.cs
- EntityCommandDefinition.cs
- XmlQueryRuntime.cs
- TaiwanLunisolarCalendar.cs
- TreeNodeBindingCollection.cs
- ScriptResourceHandler.cs
- DurableInstance.cs
- InputEventArgs.cs
- GacUtil.cs
- DataGridRowAutomationPeer.cs
- ArglessEventHandlerProxy.cs
- SimpleLine.cs
- QilGeneratorEnv.cs
- cache.cs
- WsdlInspector.cs
- ComponentRenameEvent.cs
- UpdatePanelTriggerCollection.cs
- DiscriminatorMap.cs
- x509store.cs
- XmlImplementation.cs
- HoistedLocals.cs
- XmlCodeExporter.cs
- CodeNamespaceImportCollection.cs
- _DigestClient.cs
- HTMLTagNameToTypeMapper.cs
- ContentValidator.cs
- CustomValidator.cs
- PageThemeParser.cs
- Soap11ServerProtocol.cs
- AtomServiceDocumentSerializer.cs
- DataSourceControl.cs
- DataRelation.cs
- IPGlobalProperties.cs
- shaper.cs
- ScrollItemProviderWrapper.cs
- DBSqlParserTable.cs
- SafeThreadHandle.cs
- FontDifferentiator.cs
- NullableLongSumAggregationOperator.cs
- UserControlBuildProvider.cs
- CollectionBase.cs
- BindingCollection.cs
- SqlFileStream.cs
- SmiRecordBuffer.cs
- SQLDoubleStorage.cs
- Command.cs
- ConfigurationFileMap.cs
- ParameterElementCollection.cs
- X509Utils.cs
- StylusPointDescription.cs
- XpsFixedPageReaderWriter.cs
- XmlSchemaCollection.cs
- RuntimeComponentFilter.cs
- CustomLineCap.cs
- OrderedEnumerableRowCollection.cs
- HttpModuleCollection.cs
- WindowInteractionStateTracker.cs
- ToolStripLabel.cs
- TextEditor.cs
- MsmqIntegrationInputChannel.cs
- Function.cs
- XmlDocumentSurrogate.cs
- GridViewEditEventArgs.cs
- HandoffBehavior.cs
- SimpleModelProvider.cs
- StorageModelBuildProvider.cs
- DoubleConverter.cs
- CodeDomDecompiler.cs
- UrlPropertyAttribute.cs
- TreeWalker.cs