Code:
/ 4.0 / 4.0 / 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. 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
- loginstatus.cs
- ObjectItemAssemblyLoader.cs
- ResourcePermissionBaseEntry.cs
- CreateUserWizard.cs
- ImageFormat.cs
- ComponentChangingEvent.cs
- LinqDataSourceDisposeEventArgs.cs
- SapiGrammar.cs
- PaginationProgressEventArgs.cs
- RevocationPoint.cs
- DynamicQueryableWrapper.cs
- Hashtable.cs
- TableHeaderCell.cs
- FactoryId.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- Scene3D.cs
- SemanticBasicElement.cs
- LoadedEvent.cs
- DrawingAttributesDefaultValueFactory.cs
- MasterPageParser.cs
- ServiceParser.cs
- RadioButtonPopupAdapter.cs
- DesignColumnCollection.cs
- InkCanvasInnerCanvas.cs
- CssStyleCollection.cs
- EntitySetDataBindingList.cs
- ApplicationManager.cs
- TypeElement.cs
- _NegoState.cs
- ExpressionBuilder.cs
- ArgumentValueSerializer.cs
- PhoneCallDesigner.cs
- PropertyExpression.cs
- OverflowException.cs
- TextEndOfLine.cs
- DeobfuscatingStream.cs
- WSFederationHttpSecurityElement.cs
- Knowncolors.cs
- HttpWebResponse.cs
- safesecurityhelperavalon.cs
- SelectedGridItemChangedEvent.cs
- ToolStripItemBehavior.cs
- __ComObject.cs
- HiddenField.cs
- Bits.cs
- UrlAuthorizationModule.cs
- CustomCategoryAttribute.cs
- ImageFormat.cs
- DataTableClearEvent.cs
- ApplicationServiceHelper.cs
- LineMetrics.cs
- ColorAnimationUsingKeyFrames.cs
- ToolStrip.cs
- Compiler.cs
- BaseValidator.cs
- EnterpriseServicesHelper.cs
- DCSafeHandle.cs
- EntityDataSourceDataSelectionPanel.cs
- ToolStripDropDown.cs
- OutputWindow.cs
- DataControlPagerLinkButton.cs
- RegisterResponseInfo.cs
- HtmlForm.cs
- InnerItemCollectionView.cs
- ManagementDateTime.cs
- Synchronization.cs
- FormatException.cs
- DataReaderContainer.cs
- PerformanceCounterPermissionEntry.cs
- ActivityLocationReferenceEnvironment.cs
- ListViewTableRow.cs
- ProtocolsConfigurationEntry.cs
- Match.cs
- AppSettingsExpressionBuilder.cs
- ImageMetadata.cs
- EncryptedKeyIdentifierClause.cs
- SponsorHelper.cs
- WebSysDefaultValueAttribute.cs
- ChannelSinkStacks.cs
- DataGridAddNewRow.cs
- SendMailErrorEventArgs.cs
- BinaryWriter.cs
- SafeCertificateStore.cs
- SqlBuffer.cs
- TextTreeTextElementNode.cs
- TableLayout.cs
- InterleavedZipPartStream.cs
- NamespaceEmitter.cs
- SerializableAttribute.cs
- ReferencedCollectionType.cs
- Component.cs
- XslAstAnalyzer.cs
- PackWebRequest.cs
- AsmxEndpointPickerExtension.cs
- basemetadatamappingvisitor.cs
- CodeTypeReferenceCollection.cs
- DataSet.cs
- MutableAssemblyCacheEntry.cs
- IdnMapping.cs
- ZoneIdentityPermission.cs