Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- PeerNameResolver.cs
- ServiceObjectContainer.cs
- ClosableStream.cs
- FrameworkElementFactory.cs
- Accessible.cs
- ServiceEndpoint.cs
- QilVisitor.cs
- TypeBrowserDialog.cs
- ZipPackagePart.cs
- RawStylusSystemGestureInputReport.cs
- XmlUnspecifiedAttribute.cs
- NegotiateStream.cs
- UnsafeNativeMethods.cs
- ConfigurationManager.cs
- KeyboardDevice.cs
- ClientFormsAuthenticationCredentials.cs
- WorkflowRuntimeServiceElementCollection.cs
- OdbcErrorCollection.cs
- DataKey.cs
- LOSFormatter.cs
- _IPv4Address.cs
- BitmapMetadataBlob.cs
- RegisteredExpandoAttribute.cs
- PeerCustomResolverBindingElement.cs
- SecurityProtocolFactory.cs
- QilInvokeEarlyBound.cs
- Int32.cs
- SchemaNamespaceManager.cs
- WebScriptEnablingBehavior.cs
- OraclePermission.cs
- DataGridBoolColumn.cs
- SID.cs
- ExtendedPropertyCollection.cs
- PeoplePickerWrapper.cs
- DefinitionBase.cs
- StackSpiller.cs
- XmlDataImplementation.cs
- ClickablePoint.cs
- ErrorFormatter.cs
- SiteOfOriginPart.cs
- ReadOnlyCollection.cs
- XmlSchemaCompilationSettings.cs
- UriTemplateDispatchFormatter.cs
- VectorAnimationBase.cs
- MsmqAuthenticationMode.cs
- TypeRestriction.cs
- DeflateStream.cs
- JavaScriptSerializer.cs
- _CookieModule.cs
- IdentityModelDictionary.cs
- SyndicationSerializer.cs
- XmlSchemaObjectCollection.cs
- Pts.cs
- ToolStripLabel.cs
- NullableBoolConverter.cs
- SQLUtility.cs
- FilterQueryOptionExpression.cs
- SqlProcedureAttribute.cs
- EventMap.cs
- CodeTypeReferenceExpression.cs
- X509Extension.cs
- HtmlEncodedRawTextWriter.cs
- MethodImplAttribute.cs
- IdnMapping.cs
- Debugger.cs
- Int32.cs
- DataGridViewTopLeftHeaderCell.cs
- CircleHotSpot.cs
- DynamicRendererThreadManager.cs
- QueryCacheKey.cs
- BeginStoryboard.cs
- DependentTransaction.cs
- TypeBinaryExpression.cs
- CfgParser.cs
- BuildManager.cs
- RuleInfoComparer.cs
- RadioButton.cs
- AxParameterData.cs
- IisTraceListener.cs
- ExecutionEngineException.cs
- Debugger.cs
- Helper.cs
- XPathNavigatorKeyComparer.cs
- EntryIndex.cs
- AppDomainProtocolHandler.cs
- DesignTimeTemplateParser.cs
- SqlXmlStorage.cs
- MenuRendererStandards.cs
- DataGridViewRowHeaderCell.cs
- PageTheme.cs
- FileSecurity.cs
- mediaeventargs.cs
- DataRowCollection.cs
- ModuleConfigurationInfo.cs
- TablePatternIdentifiers.cs
- SearchForVirtualItemEventArgs.cs
- Emitter.cs
- SqlGatherConsumedAliases.cs
- Size3D.cs
- DesignBindingValueUIHandler.cs