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
- TypeValidationEventArgs.cs
- XmlParserContext.cs
- EntityAdapter.cs
- MobileControlBuilder.cs
- PrivilegedConfigurationManager.cs
- DataSpaceManager.cs
- ToolStripDropDownClosingEventArgs.cs
- XmlDocumentFragment.cs
- GeometryHitTestResult.cs
- WebContext.cs
- SerializableAttribute.cs
- CreateParams.cs
- SamlDelegatingWriter.cs
- Drawing.cs
- StringPropertyBuilder.cs
- BindingList.cs
- ChannelToken.cs
- Cursors.cs
- IntegerValidator.cs
- SharedRuntimeState.cs
- DrawingContextDrawingContextWalker.cs
- MarshalByRefObject.cs
- CacheAxisQuery.cs
- PeerResolverElement.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- EntityChangedParams.cs
- CriticalHandle.cs
- XamlLoadErrorInfo.cs
- Track.cs
- CreateParams.cs
- EastAsianLunisolarCalendar.cs
- MarkupCompiler.cs
- Int64KeyFrameCollection.cs
- TypeName.cs
- EncoderReplacementFallback.cs
- MetadataItemSerializer.cs
- GenericTypeParameterBuilder.cs
- SafeNativeMethods.cs
- PersonalizableTypeEntry.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- VirtualizedItemPattern.cs
- IconEditor.cs
- TemplateControlBuildProvider.cs
- AbandonedMutexException.cs
- ControlValuePropertyAttribute.cs
- SerialErrors.cs
- StrokeCollectionDefaultValueFactory.cs
- AutomationEvent.cs
- SchemaTableColumn.cs
- EventRoute.cs
- AuthenticationServiceManager.cs
- ConfigurationSettings.cs
- CurrentChangingEventManager.cs
- SymbolUsageManager.cs
- PageAction.cs
- ButtonAutomationPeer.cs
- RequiredFieldValidator.cs
- ContentTextAutomationPeer.cs
- AssemblyInfo.cs
- RowToFieldTransformer.cs
- WebFaultException.cs
- EntityParameterCollection.cs
- CallContext.cs
- DataGridItemEventArgs.cs
- Propagator.JoinPropagator.cs
- MachineKeySection.cs
- VectorValueSerializer.cs
- TrustManager.cs
- XmlDataLoader.cs
- Style.cs
- XslCompiledTransform.cs
- EntityProviderServices.cs
- DiscoveryClientProtocol.cs
- RegistryKey.cs
- TemplateColumn.cs
- SoapParser.cs
- CompiledAction.cs
- ActivityBuilderHelper.cs
- ColumnCollection.cs
- RangeValidator.cs
- HealthMonitoringSectionHelper.cs
- XmlSchemaSimpleTypeList.cs
- SqlVersion.cs
- OdbcPermission.cs
- Vector3DCollectionConverter.cs
- EventBuilder.cs
- FilteredSchemaElementLookUpTable.cs
- PersonalizationEntry.cs
- EventLog.cs
- Encoder.cs
- Subtree.cs
- AccessDataSource.cs
- AuthenticationModulesSection.cs
- UrlPath.cs
- SharedStatics.cs
- ConnectionManagementElement.cs
- ServiceElement.cs
- Html32TextWriter.cs
- PageVisual.cs
- xml.cs