Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DLinq / Dlinq / Exceptions.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SimpleFieldTemplateUserControl.cs
- LogicalExpr.cs
- SchemaObjectWriter.cs
- RowParagraph.cs
- SafeEventLogReadHandle.cs
- TextBreakpoint.cs
- SystemColors.cs
- InvalidDataContractException.cs
- ListControlStringCollectionEditor.cs
- Evaluator.cs
- BaseProcessor.cs
- DoubleLinkListEnumerator.cs
- CodeRegionDirective.cs
- smtpconnection.cs
- DataGridViewCellFormattingEventArgs.cs
- ConnectionManagementElementCollection.cs
- LabelDesigner.cs
- AttributeParameterInfo.cs
- WebPartVerbCollection.cs
- OleTxTransaction.cs
- XmlDictionaryReaderQuotasElement.cs
- Trace.cs
- Style.cs
- WorkflowInstanceContextProvider.cs
- PageRanges.cs
- ListViewEditEventArgs.cs
- CommandHelper.cs
- XDeferredAxisSource.cs
- PathFigure.cs
- NotFiniteNumberException.cs
- PropertyManager.cs
- WindowsListBox.cs
- StatusBarDesigner.cs
- DSASignatureFormatter.cs
- Globals.cs
- NumberSubstitution.cs
- TextServicesLoader.cs
- DocComment.cs
- InterleavedZipPartStream.cs
- EditorZoneBase.cs
- CodeNamespace.cs
- DataContractFormatAttribute.cs
- VisualTreeFlattener.cs
- Clipboard.cs
- XsdDuration.cs
- GrammarBuilderWildcard.cs
- Region.cs
- CopyNamespacesAction.cs
- AttributeUsageAttribute.cs
- sortedlist.cs
- SettingsPropertyIsReadOnlyException.cs
- BindingCompleteEventArgs.cs
- PermissionRequestEvidence.cs
- UIAgentMonitorHandle.cs
- HttpRequestWrapper.cs
- TextLineResult.cs
- ProcessModelSection.cs
- CalloutQueueItem.cs
- CapabilitiesRule.cs
- StyleSheetComponentEditor.cs
- ProtocolInformationReader.cs
- WebControlParameterProxy.cs
- ReflectionTypeLoadException.cs
- CodeTypeReferenceCollection.cs
- FlowDocument.cs
- EntityRecordInfo.cs
- HierarchicalDataTemplate.cs
- FileDetails.cs
- SHA1Managed.cs
- XsltContext.cs
- TdsParser.cs
- RunClient.cs
- SettingsSavedEventArgs.cs
- HtmlInputHidden.cs
- QueryCursorEventArgs.cs
- WorkerRequest.cs
- KeyConstraint.cs
- SHA256Managed.cs
- CodeMemberMethod.cs
- WebServiceResponseDesigner.cs
- EncoderNLS.cs
- CompressionTransform.cs
- DocumentPaginator.cs
- StringExpressionSet.cs
- RTTypeWrapper.cs
- Internal.cs
- DataGridItemEventArgs.cs
- DesignRelationCollection.cs
- GroupQuery.cs
- XmlQualifiedName.cs
- Visual3DCollection.cs
- WebControlAdapter.cs
- DataGridDesigner.cs
- BasicDesignerLoader.cs
- XmlTextWriter.cs
- SEHException.cs
- PreApplicationStartMethodAttribute.cs
- SelectionHighlightInfo.cs
- SystemDropShadowChrome.cs
- SectionRecord.cs