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
- ImageListDesigner.cs
- CollectionChangeEventArgs.cs
- ContextInformation.cs
- DataGridViewColumnConverter.cs
- AssemblySettingAttributes.cs
- ADConnectionHelper.cs
- Quad.cs
- EpmSourcePathSegment.cs
- RegexParser.cs
- MeasureItemEvent.cs
- OleDbDataReader.cs
- Win32PrintDialog.cs
- SortFieldComparer.cs
- LinkArea.cs
- PropertyChangeTracker.cs
- InvalidContentTypeException.cs
- ToolStripPanelRow.cs
- CodeArgumentReferenceExpression.cs
- ProcessModuleCollection.cs
- __ComObject.cs
- ImportFileRequest.cs
- CardSpacePolicyElement.cs
- DataGridAutoFormatDialog.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- SystemTcpConnection.cs
- LoginCancelEventArgs.cs
- Utils.cs
- RepeaterDesigner.cs
- NamespaceMapping.cs
- HelpKeywordAttribute.cs
- ComponentResourceManager.cs
- BamlResourceContent.cs
- ExpandSegmentCollection.cs
- COM2ColorConverter.cs
- WebPartCloseVerb.cs
- BitmapEffect.cs
- StringFreezingAttribute.cs
- PackageDigitalSignature.cs
- ConnectionPoint.cs
- TextTreeText.cs
- SvcFileManager.cs
- Literal.cs
- PerformanceCountersElement.cs
- JsonSerializer.cs
- DropShadowEffect.cs
- RegexCaptureCollection.cs
- DesignerVerbCollection.cs
- FontConverter.cs
- StateDesigner.LayoutSelectionGlyph.cs
- UnsafeNativeMethodsMilCoreApi.cs
- TileBrush.cs
- SendMessageRecord.cs
- CreateUserWizard.cs
- TextDecorationCollectionConverter.cs
- LocationSectionRecord.cs
- ThumbButtonInfoCollection.cs
- MaskedTextBoxDesignerActionList.cs
- ServiceProviders.cs
- IntermediatePolicyValidator.cs
- CurrencyManager.cs
- Process.cs
- ProgressBarHighlightConverter.cs
- TypeLoadException.cs
- StartFileNameEditor.cs
- IisTraceWebEventProvider.cs
- XmlDocumentFragment.cs
- SystemInformation.cs
- SerializationEventsCache.cs
- SafeSystemMetrics.cs
- MiniLockedBorderGlyph.cs
- CaseInsensitiveComparer.cs
- SkipQueryOptionExpression.cs
- DefaultBindingPropertyAttribute.cs
- ColumnHeaderConverter.cs
- RawStylusInputReport.cs
- XmlRawWriterWrapper.cs
- GridItemPatternIdentifiers.cs
- ValueExpressions.cs
- CompilerError.cs
- PropertyGridDesigner.cs
- ContextStaticAttribute.cs
- SelectionRangeConverter.cs
- DelayedRegex.cs
- XmlTextReader.cs
- NetworkCredential.cs
- PathParser.cs
- ObjectDataProvider.cs
- ObjectHelper.cs
- StructuredProperty.cs
- TreeBuilder.cs
- FusionWrap.cs
- DataGridViewRowsRemovedEventArgs.cs
- WebPartDescriptionCollection.cs
- MembershipAdapter.cs
- FrameworkContextData.cs
- Assembly.cs
- Relationship.cs
- ObjectComplexPropertyMapping.cs
- followingquery.cs
- OneOfElement.cs