Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / Validation / WorkflowValidationFailedException.cs / 1305376 / WorkflowValidationFailedException.cs
namespace System.Workflow.ComponentModel.Compiler { using System; using System.Runtime.Serialization; using System.Collections.Generic; using System.Security.Permissions; [Serializable()] public sealed class WorkflowValidationFailedException : Exception { private ValidationErrorCollection errors = null; private WorkflowValidationFailedException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this.errors = (ValidationErrorCollection)info.GetValue("errors", typeof(ValidationErrorCollection)); if (this.errors == null) throw new SerializationException(SR.GetString(SR.Error_SerializationInsufficientState)); } public WorkflowValidationFailedException() : base(SR.GetString(SR.Error_WorkflowLoadValidationFailed)) { } public WorkflowValidationFailedException(string message) : base(message) { } public WorkflowValidationFailedException(string message, Exception innerException) : base(message, innerException) { } public WorkflowValidationFailedException(string message, ValidationErrorCollection errors) : base(message) { if (errors == null) throw new ArgumentNullException("errors"); this.errors = XomlCompilerHelper.MorphIntoFriendlyValidationErrors(errors); } public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); //ValidationErrorCollection is serializable info.AddValue("errors", this.errors, typeof(ValidationErrorCollection)); } public ValidationErrorCollection Errors { get { return this.errors; } } } } // 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.Runtime.Serialization; using System.Collections.Generic; using System.Security.Permissions; [Serializable()] public sealed class WorkflowValidationFailedException : Exception { private ValidationErrorCollection errors = null; private WorkflowValidationFailedException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this.errors = (ValidationErrorCollection)info.GetValue("errors", typeof(ValidationErrorCollection)); if (this.errors == null) throw new SerializationException(SR.GetString(SR.Error_SerializationInsufficientState)); } public WorkflowValidationFailedException() : base(SR.GetString(SR.Error_WorkflowLoadValidationFailed)) { } public WorkflowValidationFailedException(string message) : base(message) { } public WorkflowValidationFailedException(string message, Exception innerException) : base(message, innerException) { } public WorkflowValidationFailedException(string message, ValidationErrorCollection errors) : base(message) { if (errors == null) throw new ArgumentNullException("errors"); this.errors = XomlCompilerHelper.MorphIntoFriendlyValidationErrors(errors); } public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); //ValidationErrorCollection is serializable info.AddValue("errors", this.errors, typeof(ValidationErrorCollection)); } public ValidationErrorCollection Errors { get { return this.errors; } } } } // 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
- SqlCommandBuilder.cs
- SessionStateUtil.cs
- DrawingState.cs
- DPAPIProtectedConfigurationProvider.cs
- DynamicHyperLink.cs
- PrintDialog.cs
- ParameterBuilder.cs
- EtwTrace.cs
- DesignerCalendarAdapter.cs
- Primitive.cs
- DeclarativeCatalogPart.cs
- BaseAddressPrefixFilterElement.cs
- FormatControl.cs
- _FtpControlStream.cs
- DesignerRegionMouseEventArgs.cs
- CancelEventArgs.cs
- _Events.cs
- MessagePartDescriptionCollection.cs
- WebPartCancelEventArgs.cs
- DPAPIProtectedConfigurationProvider.cs
- PolicyConversionContext.cs
- CanonicalFontFamilyReference.cs
- OrderedDictionary.cs
- WeakReference.cs
- ExceptionValidationRule.cs
- TreeNodeSelectionProcessor.cs
- StronglyTypedResourceBuilder.cs
- SlipBehavior.cs
- PointLightBase.cs
- HealthMonitoringSectionHelper.cs
- ColorTransformHelper.cs
- VariableValue.cs
- HttpCacheVary.cs
- MembershipSection.cs
- Message.cs
- Label.cs
- processwaithandle.cs
- ColumnResizeUndoUnit.cs
- AQNBuilder.cs
- PrinterUnitConvert.cs
- PartBasedPackageProperties.cs
- InputMethodStateTypeInfo.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- shaperfactoryquerycachekey.cs
- EnumMember.cs
- MessageEncoder.cs
- MessageQueuePermissionEntry.cs
- MobileContainerDesigner.cs
- SystemColors.cs
- TextSchema.cs
- CorrelationKeyCalculator.cs
- WinEventTracker.cs
- DataSourceHelper.cs
- Int32.cs
- CompositeFontParser.cs
- WebPartsPersonalizationAuthorization.cs
- DefaultMemberAttribute.cs
- FileRecordSequence.cs
- IProvider.cs
- TimelineClockCollection.cs
- DbParameterHelper.cs
- DocumentPageView.cs
- EmptyElement.cs
- FixedSOMTableRow.cs
- ExceptionHandler.cs
- LoginDesigner.cs
- ListViewAutomationPeer.cs
- WindowsStatic.cs
- GlyphCache.cs
- XmlIlTypeHelper.cs
- XPathScanner.cs
- WebAdminConfigurationHelper.cs
- Socket.cs
- AnnouncementService.cs
- RegistryPermission.cs
- ExitEventArgs.cs
- EventData.cs
- TargetConverter.cs
- ToolStripPanelCell.cs
- Pen.cs
- RtfFormatStack.cs
- DataGridViewTextBoxEditingControl.cs
- FixedDSBuilder.cs
- ItemList.cs
- FontStyle.cs
- StaticContext.cs
- SystemUnicastIPAddressInformation.cs
- CustomWebEventKey.cs
- UrlAuthFailedErrorFormatter.cs
- PerformanceCounterManager.cs
- GridViewRowEventArgs.cs
- DataBindingHandlerAttribute.cs
- VisualTreeUtils.cs
- DbConnectionFactory.cs
- ApplicationManager.cs
- MaskDescriptor.cs
- HttpHandlerAction.cs
- VoiceInfo.cs
- AnnotationHighlightLayer.cs
- ToolboxCategory.cs