Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Objects / ObjectStateEntryOriginalDbUpdatableDataRecord.cs / 2 / ObjectStateEntryOriginalDbUpdatableDataRecord.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.ComponentModel; using System.Data; using System.Data.Common; using System.Data.Metadata.Edm; using System.Diagnostics; using System.Reflection; namespace System.Data.Objects { internal sealed class ObjectStateEntryOriginalDbUpdatableDataRecord : CurrentValueRecord { internal ObjectStateEntryOriginalDbUpdatableDataRecord(ObjectStateEntry cacheEntry, StateManagerTypeMetadata metadata, object userObject) : base(cacheEntry, metadata, userObject) { EntityUtil.CheckArgumentNull(cacheEntry, "cacheEntry"); EntityUtil.CheckArgumentNull(userObject, "userObject"); EntityUtil.CheckArgumentNull(metadata, "metadata"); Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryOriginalDbUpdatableDataRecord for a key entry"); switch (cacheEntry.State) { case EntityState.Unchanged: case EntityState.Modified: case EntityState.Deleted: break; default: throw EntityUtil.CannotCreateObjectStateEntryOriginalDbUpdatableDataRecord(); } } protected override object GetRecordValue(int ordinal) { Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship"); return _cacheEntry.GetOriginalEntityValue(_metadata, ordinal, _userObject, ObjectStateValueRecord.OriginalUpdatable); } protected override void SetRecordValue(int ordinal, object value) { Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship"); _cacheEntry.SetOriginalEntityValue(_metadata, ordinal, _userObject, value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.ComponentModel; using System.Data; using System.Data.Common; using System.Data.Metadata.Edm; using System.Diagnostics; using System.Reflection; namespace System.Data.Objects { internal sealed class ObjectStateEntryOriginalDbUpdatableDataRecord : CurrentValueRecord { internal ObjectStateEntryOriginalDbUpdatableDataRecord(ObjectStateEntry cacheEntry, StateManagerTypeMetadata metadata, object userObject) : base(cacheEntry, metadata, userObject) { EntityUtil.CheckArgumentNull(cacheEntry, "cacheEntry"); EntityUtil.CheckArgumentNull(userObject, "userObject"); EntityUtil.CheckArgumentNull(metadata, "metadata"); Debug.Assert(!cacheEntry.IsKeyEntry, "Cannot create an ObjectStateEntryOriginalDbUpdatableDataRecord for a key entry"); switch (cacheEntry.State) { case EntityState.Unchanged: case EntityState.Modified: case EntityState.Deleted: break; default: throw EntityUtil.CannotCreateObjectStateEntryOriginalDbUpdatableDataRecord(); } } protected override object GetRecordValue(int ordinal) { Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship"); return _cacheEntry.GetOriginalEntityValue(_metadata, ordinal, _userObject, ObjectStateValueRecord.OriginalUpdatable); } protected override void SetRecordValue(int ordinal, object value) { Debug.Assert(!_cacheEntry.IsRelationship, "should not be relationship"); _cacheEntry.SetOriginalEntityValue(_metadata, ordinal, _userObject, value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PrivilegedConfigurationManager.cs
- XmlNotation.cs
- BuildProviderUtils.cs
- AppSettingsExpressionBuilder.cs
- XmlSiteMapProvider.cs
- SqlPersonalizationProvider.cs
- IOThreadTimer.cs
- DSACryptoServiceProvider.cs
- PrinterResolution.cs
- DataGridTextBoxColumn.cs
- XmlProcessingInstruction.cs
- LassoSelectionBehavior.cs
- IODescriptionAttribute.cs
- MailAddressCollection.cs
- SortedDictionary.cs
- IndentedTextWriter.cs
- Number.cs
- ShapingEngine.cs
- EditorZoneDesigner.cs
- DataSourceXmlAttributeAttribute.cs
- HierarchicalDataBoundControlAdapter.cs
- Choices.cs
- StyleCollection.cs
- _BasicClient.cs
- AssertFilter.cs
- DataTableMappingCollection.cs
- DocumentPageTextView.cs
- unsafenativemethodsother.cs
- RegistrationServices.cs
- ArrayElementGridEntry.cs
- EntityDataSourceStatementEditor.cs
- RegexCompilationInfo.cs
- PropertyGeneratedEventArgs.cs
- DupHandleConnectionReader.cs
- Bits.cs
- InkCanvasSelection.cs
- LinkClickEvent.cs
- SerializationBinder.cs
- GeometryGroup.cs
- DataGridColumn.cs
- FontCacheUtil.cs
- AppSecurityManager.cs
- SafeEventHandle.cs
- RemoteWebConfigurationHost.cs
- GeneralTransform2DTo3DTo2D.cs
- ChannelManagerHelpers.cs
- DesignerTransactionCloseEvent.cs
- unsafenativemethodsother.cs
- SQLConvert.cs
- BaseCAMarshaler.cs
- CaseExpr.cs
- CodeEventReferenceExpression.cs
- MgmtConfigurationRecord.cs
- SafeMILHandleMemoryPressure.cs
- LinqExpressionNormalizer.cs
- TextRunTypographyProperties.cs
- ToolStripItemImageRenderEventArgs.cs
- Certificate.cs
- Unit.cs
- ColorMatrix.cs
- StreamGeometryContext.cs
- XmlHierarchicalDataSourceView.cs
- UriTemplateMatch.cs
- TraceHandler.cs
- Transform3DCollection.cs
- AuthorizationPolicyTypeElementCollection.cs
- MatrixCamera.cs
- CompareInfo.cs
- Publisher.cs
- SchemaElement.cs
- CollectionViewGroupInternal.cs
- Expr.cs
- _Connection.cs
- CompositeControl.cs
- BasicAsyncResult.cs
- TagNameToTypeMapper.cs
- FloatUtil.cs
- ObjectNotFoundException.cs
- StringFreezingAttribute.cs
- SafeEventLogWriteHandle.cs
- WebPartCloseVerb.cs
- BaseDataBoundControlDesigner.cs
- _ConnectStream.cs
- DataPointer.cs
- XpsFontSerializationService.cs
- XmlDomTextWriter.cs
- CompletedAsyncResult.cs
- DateTimeOffsetStorage.cs
- ReadOnlyDictionary.cs
- Brush.cs
- TypeUsage.cs
- Sentence.cs
- XmlName.cs
- MobileContainerDesigner.cs
- PeerApplication.cs
- AdapterDictionary.cs
- PointLight.cs
- StringCollection.cs
- FlowDocumentReaderAutomationPeer.cs
- EdmComplexPropertyAttribute.cs