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
- ComPersistableTypeElementCollection.cs
- KeyedCollection.cs
- UInt32Storage.cs
- ArgIterator.cs
- _UriTypeConverter.cs
- ResourcePermissionBaseEntry.cs
- VirtualPath.cs
- ScaleTransform3D.cs
- View.cs
- SafeRegistryKey.cs
- BamlTreeUpdater.cs
- List.cs
- FrameworkTextComposition.cs
- DragDrop.cs
- OleDbFactory.cs
- PropertyEmitterBase.cs
- InputChannelBinder.cs
- Polygon.cs
- HttpHandlerActionCollection.cs
- ServiceNotStartedException.cs
- AsnEncodedData.cs
- TranslateTransform.cs
- ControlIdConverter.cs
- CurrencyManager.cs
- UnsafeNativeMethods.cs
- TreeViewCancelEvent.cs
- BufferModeSettings.cs
- KoreanCalendar.cs
- xamlnodes.cs
- DataServiceClientException.cs
- ExceptionUtil.cs
- ProfileBuildProvider.cs
- XmlCodeExporter.cs
- DbInsertCommandTree.cs
- Material.cs
- TimeSpanSecondsConverter.cs
- ConnectionProviderAttribute.cs
- Html32TextWriter.cs
- CodeThrowExceptionStatement.cs
- SqlUserDefinedTypeAttribute.cs
- XmlSerializerVersionAttribute.cs
- CountAggregationOperator.cs
- WindowsTokenRoleProvider.cs
- DataReceivedEventArgs.cs
- CodeMemberEvent.cs
- AppDomainManager.cs
- TextElementCollectionHelper.cs
- ContentPlaceHolder.cs
- StringReader.cs
- ClientScriptManager.cs
- DbDataReader.cs
- PropertyTabChangedEvent.cs
- TimeManager.cs
- DataListItemEventArgs.cs
- ComboBox.cs
- TextContainerHelper.cs
- Thickness.cs
- ClientUtils.cs
- TemplatePartAttribute.cs
- TemplatePropertyEntry.cs
- ModelTreeEnumerator.cs
- GuidConverter.cs
- ImpersonateTokenRef.cs
- SystemGatewayIPAddressInformation.cs
- EventSinkActivityDesigner.cs
- PropertyGeneratedEventArgs.cs
- Win32KeyboardDevice.cs
- ArrayConverter.cs
- DrawingGroupDrawingContext.cs
- DivideByZeroException.cs
- Vector3DAnimation.cs
- DBSchemaRow.cs
- CommandLineParser.cs
- WebReference.cs
- SimpleTypesSurrogate.cs
- HttpWriter.cs
- AnnotationService.cs
- _PooledStream.cs
- NestPullup.cs
- ProfessionalColorTable.cs
- SelectionEditor.cs
- SoapDocumentServiceAttribute.cs
- CodePageUtils.cs
- ToolBarButton.cs
- TemplatePartAttribute.cs
- SafeThreadHandle.cs
- UnsafeNativeMethods.cs
- Matrix.cs
- GridViewItemAutomationPeer.cs
- EntityTypeEmitter.cs
- NonDualMessageSecurityOverHttp.cs
- TrackingProfileCache.cs
- DataMemberListEditor.cs
- ObjectParameterCollection.cs
- XmlDictionaryString.cs
- DbDataSourceEnumerator.cs
- DispatcherHooks.cs
- CodeChecksumPragma.cs
- Image.cs
- ToolStripMenuItem.cs