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
- Journal.cs
- ComplexTypeEmitter.cs
- IPAddressCollection.cs
- UnicastIPAddressInformationCollection.cs
- ObjectItemCollection.cs
- CodeDirectoryCompiler.cs
- TableLayoutSettingsTypeConverter.cs
- DataSourceView.cs
- Select.cs
- DependencyObject.cs
- Double.cs
- ArrangedElement.cs
- BooleanSwitch.cs
- ReadWriteSpinLock.cs
- NativeMethods.cs
- MediaTimeline.cs
- CngKeyBlobFormat.cs
- Merger.cs
- WebPartZoneCollection.cs
- StylusTip.cs
- IImplicitResourceProvider.cs
- XmlSchemaDatatype.cs
- SqlCharStream.cs
- RectangleConverter.cs
- AddInDeploymentState.cs
- Debug.cs
- CommandCollectionEditor.cs
- PointCollection.cs
- XmlCustomFormatter.cs
- FormattedTextSymbols.cs
- Descriptor.cs
- UIElementCollection.cs
- IfAction.cs
- MdiWindowListItemConverter.cs
- RegexGroupCollection.cs
- EnglishPluralizationService.cs
- RuleSettingsCollection.cs
- pingexception.cs
- MetabaseServerConfig.cs
- ToolStripGrip.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- HttpProfileGroupBase.cs
- UxThemeWrapper.cs
- BitFlagsGenerator.cs
- RectangleConverter.cs
- TableItemStyle.cs
- CustomSignedXml.cs
- TreeBuilder.cs
- Transform3DGroup.cs
- ButtonPopupAdapter.cs
- Geometry.cs
- FixedFlowMap.cs
- TrackBar.cs
- CodeBinaryOperatorExpression.cs
- CommandHelpers.cs
- X500Name.cs
- BamlRecordWriter.cs
- HuffModule.cs
- UidPropertyAttribute.cs
- SetterBase.cs
- StaticFileHandler.cs
- ToolboxItemAttribute.cs
- CompilerState.cs
- XmlDocumentSchema.cs
- FileSystemWatcher.cs
- XmlSerializationReader.cs
- ScriptDescriptor.cs
- CreateUserWizardStep.cs
- XamlFrame.cs
- ParameterModifier.cs
- CompressionTransform.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- DataGridViewAdvancedBorderStyle.cs
- XPathNavigatorException.cs
- MexTcpBindingCollectionElement.cs
- InteropBitmapSource.cs
- ArrayConverter.cs
- TextBoxBase.cs
- SR.cs
- XmlWellformedWriter.cs
- ReaderOutput.cs
- ErrorEventArgs.cs
- ObjectManager.cs
- FunctionMappingTranslator.cs
- HtmlTableRowCollection.cs
- DbInsertCommandTree.cs
- processwaithandle.cs
- DetailsViewPagerRow.cs
- SHA256Managed.cs
- ManagementEventWatcher.cs
- CombinedGeometry.cs
- TransformGroup.cs
- UpdateProgress.cs
- DocumentApplicationJournalEntry.cs
- ShaperBuffers.cs
- cookiecollection.cs
- SafeBitVector32.cs
- Size.cs
- FunctionMappingTranslator.cs
- CapabilitiesPattern.cs