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
- AssertHelper.cs
- MonthChangedEventArgs.cs
- SafeRightsManagementPubHandle.cs
- MDIClient.cs
- SmtpTransport.cs
- ViewRendering.cs
- ToolbarAUtomationPeer.cs
- ValidatorCompatibilityHelper.cs
- DebugView.cs
- KeyedCollection.cs
- SharedPerformanceCounter.cs
- AsyncStreamReader.cs
- ISCIIEncoding.cs
- ListViewTableRow.cs
- XmlSchemaSimpleContentExtension.cs
- SqlComparer.cs
- IPAddress.cs
- PersonalizationProviderHelper.cs
- Misc.cs
- BitArray.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- XpsLiterals.cs
- WinFormsSecurity.cs
- FlowLayoutSettings.cs
- Form.cs
- Behavior.cs
- WebBrowserBase.cs
- BitmapEffectInput.cs
- BindingValueChangedEventArgs.cs
- BooleanConverter.cs
- Literal.cs
- AutomationPattern.cs
- VectorCollectionConverter.cs
- UnsafeNetInfoNativeMethods.cs
- HijriCalendar.cs
- _FtpControlStream.cs
- WaitForChangedResult.cs
- TypeBuilderInstantiation.cs
- SocketAddress.cs
- TdsParserStaticMethods.cs
- ContractBase.cs
- SoundPlayerAction.cs
- ReadOnlyObservableCollection.cs
- ISAPIRuntime.cs
- ToggleButtonAutomationPeer.cs
- EntityCollectionChangedParams.cs
- PreservationFileReader.cs
- ObjectDataSourceFilteringEventArgs.cs
- HtmlControl.cs
- StatusBar.cs
- DBCSCodePageEncoding.cs
- ToolboxItem.cs
- PropertyItemInternal.cs
- SqlClientMetaDataCollectionNames.cs
- DbDataSourceEnumerator.cs
- Command.cs
- HtmlInputHidden.cs
- CodeIndexerExpression.cs
- PagePropertiesChangingEventArgs.cs
- GetKeyedHashRequest.cs
- CacheMemory.cs
- FormsAuthentication.cs
- MappedMetaModel.cs
- hresults.cs
- SelectionListComponentEditor.cs
- KeySpline.cs
- base64Transforms.cs
- Selection.cs
- DbConnectionPoolOptions.cs
- RoutedCommand.cs
- _SSPISessionCache.cs
- PopupRootAutomationPeer.cs
- ManagedFilter.cs
- FontFamilyValueSerializer.cs
- PartialCachingAttribute.cs
- XamlTypeMapper.cs
- IdentityReference.cs
- OdbcErrorCollection.cs
- Double.cs
- StatusBar.cs
- PropertyInfo.cs
- FlowDocumentPaginator.cs
- BlockCollection.cs
- StateItem.cs
- UrlUtility.cs
- ToolboxItemCollection.cs
- ServiceOperationParameter.cs
- TreeIterator.cs
- ArithmeticException.cs
- ResolveDuplexAsyncResult.cs
- SymbolUsageManager.cs
- GenericWebPart.cs
- _NativeSSPI.cs
- ControlBindingsConverter.cs
- BlurBitmapEffect.cs
- EventProviderBase.cs
- PathFigureCollectionConverter.cs
- Component.cs
- SystemFonts.cs
- SqlTriggerAttribute.cs