Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / Validation / ValidationError.cs / 1305376 / ValidationError.cs
namespace System.Workflow.ComponentModel.Compiler { using System; using System.Collections; using System.Globalization; #region Class ValidationError [Serializable()] public sealed class ValidationError { private string errorText = string.Empty; private int errorNumber = 0; private Hashtable userData = null; private bool isWarning = false; string propertyName = null; public ValidationError(string errorText, int errorNumber) : this(errorText, errorNumber, false, null) { } public ValidationError(string errorText, int errorNumber, bool isWarning) : this(errorText, errorNumber, isWarning, null) { } public ValidationError(string errorText, int errorNumber, bool isWarning, string propertyName) { this.errorText = errorText; this.errorNumber = errorNumber; this.isWarning = isWarning; this.propertyName = propertyName; } public string PropertyName { get { return this.propertyName; } set { this.propertyName = value; } } public string ErrorText { get { return this.errorText; } } public bool IsWarning { get { return this.isWarning; } } public int ErrorNumber { get { return this.errorNumber; } } public IDictionary UserData { get { if (this.userData == null) this.userData = new Hashtable(); return this.userData; } } public static ValidationError GetNotSetValidationError(string propertyName) { ValidationError error = new ValidationError(SR.GetString(SR.Error_PropertyNotSet, propertyName), ErrorNumbers.Error_PropertyNotSet); error.PropertyName = propertyName; return error; } public override string ToString() { return String.Format(CultureInfo.InvariantCulture, "{0} {1}: {2}", this.isWarning ? "warning" : "error", this.errorNumber, this.errorText); } } #endregion } // 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
- FrugalList.cs
- ConnectionInterfaceCollection.cs
- CodeVariableReferenceExpression.cs
- GridViewUpdateEventArgs.cs
- MetadataPropertyAttribute.cs
- UserControl.cs
- IteratorFilter.cs
- MasterPageCodeDomTreeGenerator.cs
- BinaryFormatterWriter.cs
- CheckBox.cs
- DefaultProxySection.cs
- CookieParameter.cs
- HwndSubclass.cs
- LocationUpdates.cs
- ListView.cs
- SqlTopReducer.cs
- rsa.cs
- RtfToXamlReader.cs
- ImageSource.cs
- CoreSwitches.cs
- StorageRoot.cs
- ParenthesizePropertyNameAttribute.cs
- SearchForVirtualItemEventArgs.cs
- ResourceProviderFactory.cs
- sqlpipe.cs
- BitmapMetadata.cs
- DatePickerAutomationPeer.cs
- RowParagraph.cs
- HtmlContainerControl.cs
- SourceSwitch.cs
- XmlSchemaAttributeGroup.cs
- Canvas.cs
- SystemColors.cs
- RowUpdatingEventArgs.cs
- TrustSection.cs
- GlobalEventManager.cs
- Container.cs
- XmlDictionaryReader.cs
- _CommandStream.cs
- pingexception.cs
- EditorPart.cs
- Char.cs
- KeyPullup.cs
- CustomAttribute.cs
- BindableAttribute.cs
- DesignTimeTemplateParser.cs
- BinaryExpression.cs
- ContentElement.cs
- XmlQueryOutput.cs
- FontUnitConverter.cs
- ThreadStartException.cs
- RawStylusInputReport.cs
- DataGridViewIntLinkedList.cs
- WorkflowMarkupSerializerMapping.cs
- AuthenticationService.cs
- XmlIgnoreAttribute.cs
- TextReader.cs
- AspNetHostingPermission.cs
- XmlUtil.cs
- ProgressBarAutomationPeer.cs
- XamlPointCollectionSerializer.cs
- ISAPIRuntime.cs
- ListChangedEventArgs.cs
- HtmlButton.cs
- ShadowGlyph.cs
- ApplicationGesture.cs
- DataGridTable.cs
- StyleSheet.cs
- ObjectComplexPropertyMapping.cs
- ImageMetadata.cs
- XmlWellformedWriter.cs
- WebPartDisplayModeCancelEventArgs.cs
- EventListenerClientSide.cs
- TreeIterator.cs
- UserControlParser.cs
- Imaging.cs
- CombinedHttpChannel.cs
- XmlNamespaceMappingCollection.cs
- XamlGridLengthSerializer.cs
- PrimitiveSchema.cs
- XmlLangPropertyAttribute.cs
- DataObjectCopyingEventArgs.cs
- UpdateCommand.cs
- ServiceHttpHandlerFactory.cs
- DisposableCollectionWrapper.cs
- CompilerInfo.cs
- FileUpload.cs
- LayoutTableCell.cs
- EncoderReplacementFallback.cs
- HuffCodec.cs
- IconEditor.cs
- InputScope.cs
- EmbeddedObject.cs
- SeekStoryboard.cs
- ExtensionWindowHeader.cs
- CodePageUtils.cs
- KeyMatchBuilder.cs
- PeerCustomResolverElement.cs
- ConfigXmlCDataSection.cs
- ResourcePropertyMemberCodeDomSerializer.cs