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
- StateRuntime.cs
- DocumentAutomationPeer.cs
- WindowsListViewItemCheckBox.cs
- InstanceOwnerException.cs
- Brush.cs
- DataRowView.cs
- WbemException.cs
- CallContext.cs
- MexHttpsBindingCollectionElement.cs
- CookielessData.cs
- PointLight.cs
- FolderBrowserDialog.cs
- Journal.cs
- StringUtil.cs
- Bind.cs
- SecurityAttributeGenerationHelper.cs
- XmlSchemaAttributeGroup.cs
- WebCategoryAttribute.cs
- WindowsTreeView.cs
- TrackingExtract.cs
- DataBoundControlParameterTarget.cs
- VisualStateChangedEventArgs.cs
- OleDbInfoMessageEvent.cs
- EventLogEntry.cs
- WebPartDisplayModeEventArgs.cs
- ManifestSignedXml.cs
- XmlName.cs
- ListMarkerSourceInfo.cs
- GeometryCombineModeValidation.cs
- COSERVERINFO.cs
- _FtpDataStream.cs
- RectangleF.cs
- HiddenField.cs
- FormatPage.cs
- DataTransferEventArgs.cs
- PointAnimationBase.cs
- CustomErrorsSectionWrapper.cs
- JsonEncodingStreamWrapper.cs
- ResolveResponse.cs
- WebBrowserNavigatingEventHandler.cs
- TextLine.cs
- SafeNativeMethodsOther.cs
- SyndicationFeed.cs
- CollectionDataContractAttribute.cs
- RegexMatch.cs
- MaterializeFromAtom.cs
- Point.cs
- RangeValueProviderWrapper.cs
- TableLayoutPanelBehavior.cs
- RequestCacheValidator.cs
- AxParameterData.cs
- WebOperationContext.cs
- FieldAccessException.cs
- linebase.cs
- TreeViewAutomationPeer.cs
- ErrorsHelper.cs
- DebugHandleTracker.cs
- HandleCollector.cs
- FrameSecurityDescriptor.cs
- SortedDictionary.cs
- ProviderCollection.cs
- ListViewTableCell.cs
- Attachment.cs
- MetadataItemCollectionFactory.cs
- EntityDataSourceViewSchema.cs
- DiscoveryInnerClientAdhoc11.cs
- DirectionalLight.cs
- KeyedQueue.cs
- MinMaxParagraphWidth.cs
- PropertyItemInternal.cs
- Helpers.cs
- xdrvalidator.cs
- CodeArrayIndexerExpression.cs
- HuffmanTree.cs
- CodeNamespaceImportCollection.cs
- DataKey.cs
- ThicknessAnimation.cs
- XPathDescendantIterator.cs
- ThemeDictionaryExtension.cs
- DSASignatureFormatter.cs
- TemplateControl.cs
- OleCmdHelper.cs
- CodeParameterDeclarationExpression.cs
- TagMapInfo.cs
- ConfigurationSchemaErrors.cs
- MailAddress.cs
- HashMembershipCondition.cs
- Int16Converter.cs
- ParseChildrenAsPropertiesAttribute.cs
- ImageListImageEditor.cs
- ThrowHelper.cs
- CheckableControlBaseAdapter.cs
- SoapTypeAttribute.cs
- QueryAsyncResult.cs
- InputScope.cs
- DesignTimeParseData.cs
- NCryptNative.cs
- Int32CAMarshaler.cs
- DbDataRecord.cs
- NavigationCommands.cs