Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DLinq / Dlinq / Exceptions.cs / 1 / Exceptions.cs
using System; using System.Collections.Generic; using System.Data.Linq.Provider; using System.Linq; using System.Diagnostics.CodeAnalysis; namespace System.Data.Linq { ////// DLinq-specific custom exception factory. /// [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Unknown reason.")] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Unknown reason.")] public class ChangeConflictException : Exception { public ChangeConflictException() { } public ChangeConflictException(string message) : base(message) { } public ChangeConflictException(string message, Exception innerException) : base(message, innerException) { } } ////// An attempt was made to add an object to the identity cache with a key that is already in use /// [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Unknown reason.")] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Unknown reason.")] public class DuplicateKeyException : InvalidOperationException { private object duplicate; public DuplicateKeyException(object duplicate) { this.duplicate = duplicate; } public DuplicateKeyException(object duplicate, string message) : base(message) { this.duplicate = duplicate; } public DuplicateKeyException(object duplicate, string message, Exception innerException) : base(message, innerException) { this.duplicate = duplicate; } ////// The object whose duplicate key caused the exception. /// public object Object { get { return duplicate; } } } ////// An attempt was made to change an FK but the Entity is Loaded /// [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Unknown reason.")] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Unknown reason.")] public class ForeignKeyReferenceAlreadyHasValueException : InvalidOperationException { public ForeignKeyReferenceAlreadyHasValueException() { } public ForeignKeyReferenceAlreadyHasValueException(string message) : base(message) { } public ForeignKeyReferenceAlreadyHasValueException(string message, Exception innerException) : base(message, innerException) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Data.Linq.Provider; using System.Linq; using System.Diagnostics.CodeAnalysis; namespace System.Data.Linq { ////// DLinq-specific custom exception factory. /// [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Unknown reason.")] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Unknown reason.")] public class ChangeConflictException : Exception { public ChangeConflictException() { } public ChangeConflictException(string message) : base(message) { } public ChangeConflictException(string message, Exception innerException) : base(message, innerException) { } } ////// An attempt was made to add an object to the identity cache with a key that is already in use /// [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Unknown reason.")] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Unknown reason.")] public class DuplicateKeyException : InvalidOperationException { private object duplicate; public DuplicateKeyException(object duplicate) { this.duplicate = duplicate; } public DuplicateKeyException(object duplicate, string message) : base(message) { this.duplicate = duplicate; } public DuplicateKeyException(object duplicate, string message, Exception innerException) : base(message, innerException) { this.duplicate = duplicate; } ////// The object whose duplicate key caused the exception. /// public object Object { get { return duplicate; } } } ////// An attempt was made to change an FK but the Entity is Loaded /// [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Unknown reason.")] [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Unknown reason.")] public class ForeignKeyReferenceAlreadyHasValueException : InvalidOperationException { public ForeignKeyReferenceAlreadyHasValueException() { } public ForeignKeyReferenceAlreadyHasValueException(string message) : base(message) { } public ForeignKeyReferenceAlreadyHasValueException(string message, Exception innerException) : base(message, innerException) { } } } // 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
- EFColumnProvider.cs
- Events.cs
- smtppermission.cs
- DesignerTextWriter.cs
- StandardCommandToolStripMenuItem.cs
- ContextBase.cs
- NativeMethods.cs
- UInt64Converter.cs
- MenuBindingsEditor.cs
- MetadataItemEmitter.cs
- NetworkStream.cs
- SignatureHelper.cs
- TrackingProfile.cs
- AudioDeviceOut.cs
- TextLineResult.cs
- Group.cs
- AssemblyCache.cs
- SchemaTableColumn.cs
- FilteredDataSetHelper.cs
- WebPartChrome.cs
- JavaScriptObjectDeserializer.cs
- XmlUtilWriter.cs
- DuplicateWaitObjectException.cs
- List.cs
- MergeFilterQuery.cs
- NavigationHelper.cs
- _TLSstream.cs
- TreeViewImageIndexConverter.cs
- DetectEofStream.cs
- XmlILConstructAnalyzer.cs
- AnnotationStore.cs
- MonitorWrapper.cs
- SqlWebEventProvider.cs
- sqlstateclientmanager.cs
- PeerTransportListenAddressConverter.cs
- PageAsyncTaskManager.cs
- MSAANativeProvider.cs
- RouteData.cs
- DataBindingList.cs
- PropertyKey.cs
- PointHitTestParameters.cs
- OracleParameterCollection.cs
- UIElementCollection.cs
- EnumUnknown.cs
- SchemaTypeEmitter.cs
- EventHandlers.cs
- RelationshipSet.cs
- XslAst.cs
- bidPrivateBase.cs
- WindowsImpersonationContext.cs
- XmlRootAttribute.cs
- KeyboardEventArgs.cs
- CodeAccessSecurityEngine.cs
- XmlSchemaAppInfo.cs
- HttpCacheVaryByContentEncodings.cs
- SponsorHelper.cs
- ControlCachePolicy.cs
- _NetworkingPerfCounters.cs
- ArrayWithOffset.cs
- ColorConvertedBitmapExtension.cs
- TextTreeRootTextBlock.cs
- DataGridState.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- WmpBitmapEncoder.cs
- ContentFilePart.cs
- FirstMatchCodeGroup.cs
- CodeIndexerExpression.cs
- NameObjectCollectionBase.cs
- IconHelper.cs
- TableColumn.cs
- Span.cs
- KnownColorTable.cs
- MemberInitExpression.cs
- HttpModuleActionCollection.cs
- DataStreamFromComStream.cs
- XsltInput.cs
- OneToOneMappingSerializer.cs
- EmbeddedMailObject.cs
- PseudoWebRequest.cs
- SHA1CryptoServiceProvider.cs
- AssertUtility.cs
- PtsContext.cs
- Mouse.cs
- CodeChecksumPragma.cs
- ToolZone.cs
- SiteMapDataSourceView.cs
- Parser.cs
- NewExpression.cs
- CertificateElement.cs
- Span.cs
- Rss20FeedFormatter.cs
- SourceInterpreter.cs
- AmbientProperties.cs
- DataGridViewIntLinkedList.cs
- WebConfigurationManager.cs
- ConditionalAttribute.cs
- MouseDevice.cs
- DocumentNUp.cs
- GACMembershipCondition.cs
- CodeAttributeArgument.cs