Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / Validation / ValidationErrorCollection.cs / 1305376 / ValidationErrorCollection.cs
namespace System.Workflow.ComponentModel.Compiler { using System; using System.Collections.ObjectModel; using System.Collections.Generic; #region ValidationErrorCollection [Serializable()] public sealed class ValidationErrorCollection : Collection{ public ValidationErrorCollection() { } public ValidationErrorCollection(ValidationErrorCollection value) { this.AddRange(value); } public ValidationErrorCollection(IEnumerable value) { if (value == null) throw new ArgumentNullException("value"); this.AddRange(value); } protected override void InsertItem(int index, ValidationError item) { if (item == null) throw new ArgumentNullException("item"); base.InsertItem(index, item); } protected override void SetItem(int index, ValidationError item) { if (item == null) throw new ArgumentNullException("item"); base.SetItem(index, item); } public void AddRange(IEnumerable value) { if (value == null) throw new ArgumentNullException("value"); foreach (ValidationError error in value) this.Add(error); } public bool HasErrors { get { if (Count > 0) { foreach (ValidationError e in this) { if (e != null && !e.IsWarning) return true; } } return false; } } public bool HasWarnings { get { if (Count > 0) { foreach (ValidationError e in this) { if (e != null && e.IsWarning) return true; } } return false; } } public ValidationError[] ToArray() { ValidationError[] errorsArray = new ValidationError[this.Count]; this.CopyTo(errorsArray, 0); return errorsArray; } } #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.ObjectModel; using System.Collections.Generic; #region ValidationErrorCollection [Serializable()] public sealed class ValidationErrorCollection : Collection { public ValidationErrorCollection() { } public ValidationErrorCollection(ValidationErrorCollection value) { this.AddRange(value); } public ValidationErrorCollection(IEnumerable value) { if (value == null) throw new ArgumentNullException("value"); this.AddRange(value); } protected override void InsertItem(int index, ValidationError item) { if (item == null) throw new ArgumentNullException("item"); base.InsertItem(index, item); } protected override void SetItem(int index, ValidationError item) { if (item == null) throw new ArgumentNullException("item"); base.SetItem(index, item); } public void AddRange(IEnumerable value) { if (value == null) throw new ArgumentNullException("value"); foreach (ValidationError error in value) this.Add(error); } public bool HasErrors { get { if (Count > 0) { foreach (ValidationError e in this) { if (e != null && !e.IsWarning) return true; } } return false; } } public bool HasWarnings { get { if (Count > 0) { foreach (ValidationError e in this) { if (e != null && e.IsWarning) return true; } } return false; } } public ValidationError[] ToArray() { ValidationError[] errorsArray = new ValidationError[this.Count]; this.CopyTo(errorsArray, 0); return errorsArray; } } #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
- Int64Converter.cs
- DragDropManager.cs
- AttributeQuery.cs
- Control.cs
- ToolStripArrowRenderEventArgs.cs
- ObjectFullSpanRewriter.cs
- CurrencyWrapper.cs
- DataGridViewTextBoxCell.cs
- HandledEventArgs.cs
- XmlNavigatorFilter.cs
- StatusBarItemAutomationPeer.cs
- MimeMapping.cs
- BuildProviderAppliesToAttribute.cs
- Point3DAnimationUsingKeyFrames.cs
- Random.cs
- GridLengthConverter.cs
- Message.cs
- XmlSerializer.cs
- ConfigViewGenerator.cs
- Logging.cs
- X509ThumbprintKeyIdentifierClause.cs
- QueryStatement.cs
- Repeater.cs
- RunClient.cs
- StateMachine.cs
- XmlSchemaGroupRef.cs
- StringUtil.cs
- ModuleBuilderData.cs
- SecondaryIndex.cs
- HtmlEncodedRawTextWriter.cs
- DecoderReplacementFallback.cs
- WrappedIUnknown.cs
- SoapIgnoreAttribute.cs
- DataBinder.cs
- HwndSubclass.cs
- EdmType.cs
- OSFeature.cs
- ObjectItemCachedAssemblyLoader.cs
- SafeViewOfFileHandle.cs
- DropShadowEffect.cs
- InterleavedZipPartStream.cs
- Win32MouseDevice.cs
- DynamicPropertyReader.cs
- WebPartZoneAutoFormat.cs
- UriSection.cs
- XmlText.cs
- SafeEventHandle.cs
- AlphabetConverter.cs
- FamilyTypefaceCollection.cs
- SchemaImporterExtensionElementCollection.cs
- Clock.cs
- TextEditorMouse.cs
- Message.cs
- RuleConditionDialog.Designer.cs
- StorageEntityContainerMapping.cs
- FlowLayoutPanel.cs
- DataGridViewCellValidatingEventArgs.cs
- WebResponse.cs
- ExpressionReplacer.cs
- Literal.cs
- Converter.cs
- FieldNameLookup.cs
- MimeParameters.cs
- KerberosReceiverSecurityToken.cs
- SubMenuStyle.cs
- ClientType.cs
- XmlDictionaryWriter.cs
- FtpCachePolicyElement.cs
- EntityKey.cs
- AppSettingsExpressionBuilder.cs
- TextSelection.cs
- AudioFormatConverter.cs
- WindowsListViewScroll.cs
- ISessionStateStore.cs
- BitmapEffectState.cs
- UnsafeNativeMethods.cs
- ToolStripSplitStackLayout.cs
- UpdatableGenericsFeature.cs
- SqlCacheDependencyDatabaseCollection.cs
- RemoteCryptoSignHashRequest.cs
- TcpPortSharing.cs
- IdentityValidationException.cs
- WeakEventTable.cs
- BinarySecretSecurityToken.cs
- StringUtil.cs
- FastEncoderWindow.cs
- IssuanceTokenProviderBase.cs
- lengthconverter.cs
- ObjectDisposedException.cs
- PrintEvent.cs
- GenericEnumerator.cs
- InteropBitmapSource.cs
- CounterSampleCalculator.cs
- URLIdentityPermission.cs
- WinHttpWebProxyFinder.cs
- ConnectionOrientedTransportElement.cs
- RectAnimationClockResource.cs
- BoundPropertyEntry.cs
- EventLogStatus.cs
- ListBox.cs