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
- WeakReadOnlyCollection.cs
- HostTimeoutsElement.cs
- ViewKeyConstraint.cs
- NonSerializedAttribute.cs
- Axis.cs
- ProcessThread.cs
- XslVisitor.cs
- RectAnimationBase.cs
- SystemIPGlobalStatistics.cs
- ObjectPersistData.cs
- AppDomainUnloadedException.cs
- CalendarAutoFormat.cs
- ThemeableAttribute.cs
- DecimalAnimation.cs
- Overlapped.cs
- BitmapEffectvisualstate.cs
- PointIndependentAnimationStorage.cs
- SourceSwitch.cs
- XmlSchemaValidationException.cs
- ExtentKey.cs
- PropertySegmentSerializer.cs
- RegistrySecurity.cs
- SettingsPropertyValue.cs
- EnumerableCollectionView.cs
- ScriptControlDescriptor.cs
- EdmComplexTypeAttribute.cs
- PostBackOptions.cs
- LinqDataSource.cs
- LinqDataSourceEditData.cs
- StringInfo.cs
- StringAnimationBase.cs
- RadioButtonList.cs
- _LoggingObject.cs
- FixedPosition.cs
- SpecialNameAttribute.cs
- UInt16.cs
- TypeDelegator.cs
- ScrollChangedEventArgs.cs
- CryptoApi.cs
- TextRunTypographyProperties.cs
- StandardBindingOptionalReliableSessionElement.cs
- WindowsFormsHost.cs
- FirstMatchCodeGroup.cs
- TreeNodeSelectionProcessor.cs
- NameValueFileSectionHandler.cs
- SerializationFieldInfo.cs
- Panel.cs
- RelationshipManager.cs
- XPathDocumentIterator.cs
- TransactionFormatter.cs
- _HeaderInfoTable.cs
- StrongNameIdentityPermission.cs
- RestHandlerFactory.cs
- InputLanguageSource.cs
- X509Certificate2Collection.cs
- CustomPopupPlacement.cs
- _HelperAsyncResults.cs
- XPathMultyIterator.cs
- NativeMethods.cs
- RotationValidation.cs
- DataGridViewRowPrePaintEventArgs.cs
- CompatibleComparer.cs
- BuilderInfo.cs
- CodeMethodInvokeExpression.cs
- ListViewUpdatedEventArgs.cs
- connectionpool.cs
- PointF.cs
- SQLBoolean.cs
- RequestCache.cs
- SourceChangedEventArgs.cs
- DataProviderNameConverter.cs
- FieldInfo.cs
- RoleGroupCollection.cs
- ApplicationTrust.cs
- FlowDocumentReader.cs
- DtrList.cs
- HuffmanTree.cs
- LocalizationCodeDomSerializer.cs
- HierarchicalDataBoundControlAdapter.cs
- NullableIntAverageAggregationOperator.cs
- Expression.cs
- Attachment.cs
- SqlErrorCollection.cs
- VirtualizingStackPanel.cs
- StorageComplexTypeMapping.cs
- MethodMessage.cs
- FloatUtil.cs
- CornerRadius.cs
- NameValueCollection.cs
- Point3DAnimationUsingKeyFrames.cs
- ResXResourceReader.cs
- HttpPostedFileBase.cs
- NumericUpDownAcceleration.cs
- MasterPageParser.cs
- BitmapFrameDecode.cs
- DbConnectionClosed.cs
- ToggleButton.cs
- StoreContentChangedEventArgs.cs
- InvalidWMPVersionException.cs
- Win32Native.cs