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
- RC2CryptoServiceProvider.cs
- CacheForPrimitiveTypes.cs
- NavigationCommands.cs
- TypeGeneratedEventArgs.cs
- PasswordTextContainer.cs
- InvalidFilterCriteriaException.cs
- Int16.cs
- NotifyParentPropertyAttribute.cs
- SymbolMethod.cs
- Stream.cs
- InputLanguage.cs
- TextStore.cs
- jithelpers.cs
- FastEncoder.cs
- IHttpResponseInternal.cs
- SQLGuidStorage.cs
- WinHttpWebProxyFinder.cs
- LocalBuilder.cs
- FileChangesMonitor.cs
- FormsAuthenticationUserCollection.cs
- AttachInfo.cs
- AdCreatedEventArgs.cs
- FigureParaClient.cs
- Soap.cs
- ZipIOModeEnforcingStream.cs
- wgx_sdk_version.cs
- Menu.cs
- MessageBox.cs
- ApplicationManager.cs
- GraphicsContainer.cs
- PageBuildProvider.cs
- HandledEventArgs.cs
- XPathNavigatorReader.cs
- AtomServiceDocumentSerializer.cs
- ButtonField.cs
- InlineCollection.cs
- DataGrid.cs
- AutomationElementCollection.cs
- Compiler.cs
- SystemDiagnosticsSection.cs
- Token.cs
- PathTooLongException.cs
- DbException.cs
- UrlMapping.cs
- DbModificationClause.cs
- InnerItemCollectionView.cs
- Int32Animation.cs
- ServiceMemoryGates.cs
- DPCustomTypeDescriptor.cs
- RuntimeArgumentHandle.cs
- FormsAuthenticationUser.cs
- TextOptionsInternal.cs
- RuleSettingsCollection.cs
- CopyOnWriteList.cs
- HeaderedItemsControl.cs
- TextDecorations.cs
- UriParserTemplates.cs
- Int16AnimationUsingKeyFrames.cs
- CssTextWriter.cs
- HtmlLink.cs
- Action.cs
- WebPartAuthorizationEventArgs.cs
- ReadWriteControlDesigner.cs
- SystemColors.cs
- PtsCache.cs
- AccessText.cs
- DefaultAsyncDataDispatcher.cs
- ContextMenuAutomationPeer.cs
- autovalidator.cs
- OpCellTreeNode.cs
- HandlerBase.cs
- PenContext.cs
- CacheForPrimitiveTypes.cs
- DataSourceSelectArguments.cs
- OrderByQueryOptionExpression.cs
- XmlTypeAttribute.cs
- WebPartsSection.cs
- TransactionInformation.cs
- Context.cs
- XmlAttributeCollection.cs
- CookieProtection.cs
- ParenthesizePropertyNameAttribute.cs
- LambdaCompiler.Logical.cs
- WindowsGraphics2.cs
- Wrapper.cs
- BindingMemberInfo.cs
- Group.cs
- ActivityInstanceReference.cs
- CacheDependency.cs
- _SecureChannel.cs
- SqlCachedBuffer.cs
- UnauthorizedAccessException.cs
- TextMetrics.cs
- ControlCollection.cs
- OdbcDataAdapter.cs
- TypeInitializationException.cs
- CallbackHandler.cs
- CorrelationActionMessageFilter.cs
- SafeFileMappingHandle.cs
- StdValidatorsAndConverters.cs