Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MultiplexingFormatMapping.cs
- Select.cs
- StrongTypingException.cs
- _UriSyntax.cs
- RedistVersionInfo.cs
- IDispatchConstantAttribute.cs
- PreProcessor.cs
- EmptyQuery.cs
- PageContent.cs
- OpCodes.cs
- HttpProfileBase.cs
- TextViewSelectionProcessor.cs
- TextCharacters.cs
- Pen.cs
- DeviceContexts.cs
- InternalCache.cs
- Win32Native.cs
- SqlFactory.cs
- ContextMenu.cs
- HwndHost.cs
- SocketStream.cs
- XmlWrappingWriter.cs
- ViewStateModeByIdAttribute.cs
- InvalidEnumArgumentException.cs
- Internal.cs
- HtmlForm.cs
- AssemblyHash.cs
- AuthenticodeSignatureInformation.cs
- ItemsPanelTemplate.cs
- DataServiceKeyAttribute.cs
- RowBinding.cs
- TableParagraph.cs
- LinkLabelLinkClickedEvent.cs
- MembershipValidatePasswordEventArgs.cs
- HyperLinkStyle.cs
- MultilineStringEditor.cs
- SelectionGlyphBase.cs
- DbProviderFactory.cs
- DbSource.cs
- DuplicateContext.cs
- AutoFocusStyle.xaml.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SimpleWebHandlerParser.cs
- Conditional.cs
- QueryCursorEventArgs.cs
- TextEditorCharacters.cs
- DoubleAnimationUsingKeyFrames.cs
- SafeCryptoHandles.cs
- DESCryptoServiceProvider.cs
- CodeArrayIndexerExpression.cs
- ObjectStateFormatter.cs
- CodeDomDecompiler.cs
- PolicyStatement.cs
- MembershipPasswordException.cs
- HttpProfileGroupBase.cs
- BitmapEffectInputData.cs
- DocobjHost.cs
- metadatamappinghashervisitor.cs
- SoapEnumAttribute.cs
- StringUtil.cs
- TraceLog.cs
- SslStreamSecurityBindingElement.cs
- XmlQueryContext.cs
- XamlStackWriter.cs
- GridViewPageEventArgs.cs
- ZoneButton.cs
- ProfileEventArgs.cs
- IArgumentProvider.cs
- ByteStream.cs
- ExternalCalls.cs
- NativeCppClassAttribute.cs
- DbConvert.cs
- WebPartCloseVerb.cs
- NetworkInformationPermission.cs
- WizardForm.cs
- SqlConnectionHelper.cs
- UseAttributeSetsAction.cs
- Constants.cs
- LocatorPart.cs
- DictionaryEntry.cs
- DataGridViewImageCell.cs
- ContractType.cs
- LinqDataSourceDisposeEventArgs.cs
- ToolStripCollectionEditor.cs
- IsolatedStoragePermission.cs
- Size3DConverter.cs
- XPathDocumentBuilder.cs
- InterleavedZipPartStream.cs
- ButtonStandardAdapter.cs
- RoleManagerSection.cs
- IntSecurity.cs
- BridgeDataRecord.cs
- Serializer.cs
- XPathNodeInfoAtom.cs
- WebPartEditorApplyVerb.cs
- MessageTraceRecord.cs
- SelectionRangeConverter.cs
- DataRecordInternal.cs
- ScriptDescriptor.cs
- ConsoleTraceListener.cs