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
- DefaultTraceListener.cs
- InputLanguageCollection.cs
- VisualTreeHelper.cs
- UInt32.cs
- FirstMatchCodeGroup.cs
- Hashtable.cs
- UpdateDelegates.Generated.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- SessionStateUtil.cs
- TransportConfigurationTypeElementCollection.cs
- DrawingContextWalker.cs
- TypeForwardedToAttribute.cs
- _FtpControlStream.cs
- UnsafeNativeMethods.cs
- ComplexLine.cs
- XmlIlVisitor.cs
- DataTemplateSelector.cs
- TemplatedAdorner.cs
- TimeSpanSecondsConverter.cs
- TimeSpanValidator.cs
- WebPartZoneBase.cs
- StronglyTypedResourceBuilder.cs
- TypeDescriptionProviderAttribute.cs
- RequestCachePolicy.cs
- DesignerCatalogPartChrome.cs
- GridView.cs
- ReferenceEqualityComparer.cs
- DataGridViewHeaderCell.cs
- ClockGroup.cs
- ResourceIDHelper.cs
- TimeoutException.cs
- DataGridHelper.cs
- ResXFileRef.cs
- EtwTrace.cs
- X509SubjectKeyIdentifierClause.cs
- XPathBinder.cs
- TableLayoutPanelCellPosition.cs
- TextFormatterImp.cs
- RecognizeCompletedEventArgs.cs
- XmlSerializerFactory.cs
- FormsAuthenticationCredentials.cs
- ValuePatternIdentifiers.cs
- Stylus.cs
- Encoding.cs
- ClickablePoint.cs
- BuildManagerHost.cs
- EventDescriptorCollection.cs
- TreeViewItemAutomationPeer.cs
- ConditionCollection.cs
- DataObject.cs
- TraceHwndHost.cs
- SmtpDigestAuthenticationModule.cs
- AttributeData.cs
- SubordinateTransaction.cs
- SourceLineInfo.cs
- ControlCachePolicy.cs
- PropertySegmentSerializationProvider.cs
- AutomationPatternInfo.cs
- SystemWebCachingSectionGroup.cs
- CategoryAttribute.cs
- XsltException.cs
- PixelFormats.cs
- CodeExporter.cs
- IndicFontClient.cs
- ThousandthOfEmRealPoints.cs
- MachineKeySection.cs
- DataGridViewRowPrePaintEventArgs.cs
- Dispatcher.cs
- OdbcRowUpdatingEvent.cs
- GridViewCellAutomationPeer.cs
- _DigestClient.cs
- DataControlReference.cs
- MultiByteCodec.cs
- ToolStripControlHost.cs
- SettingsPropertyCollection.cs
- LogicalCallContext.cs
- DataGridViewColumnHeaderCell.cs
- Byte.cs
- TemplatedControlDesigner.cs
- ReversePositionQuery.cs
- MemoryPressure.cs
- BlurEffect.cs
- SizeAnimationUsingKeyFrames.cs
- Roles.cs
- MsmqInputSessionChannel.cs
- HttpClientCertificate.cs
- DataGridViewCellMouseEventArgs.cs
- SpotLight.cs
- ServiceHostFactory.cs
- MessageEncodingBindingElementImporter.cs
- CompilerError.cs
- precedingsibling.cs
- RadioButtonList.cs
- AxHost.cs
- PropertyGroupDescription.cs
- ListViewContainer.cs
- SplayTreeNode.cs
- SafeFileMapViewHandle.cs
- DesigntimeLicenseContextSerializer.cs
- dataprotectionpermission.cs