Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / Update / Internal / ExtractedStateEntry.cs / 1305376 / ExtractedStateEntry.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Data.Common.CommandTrees; using System.Data.Metadata.Edm; using System.Diagnostics; using System.Linq; namespace System.Data.Mapping.Update.Internal { ////// Represents the data contained in a StateEntry using internal data structures /// of the UpdatePipeline. /// internal struct ExtractedStateEntry { internal readonly EntityState State; internal readonly PropagatorResult Original; internal readonly PropagatorResult Current; internal readonly IEntityStateEntry Source; internal ExtractedStateEntry(UpdateTranslator translator, IEntityStateEntry stateEntry) { Debug.Assert(null != stateEntry, "stateEntry must not be null"); this.State = stateEntry.State; this.Source = stateEntry; switch (stateEntry.State) { case EntityState.Deleted: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, ModifiedPropertiesBehavior.AllModified); this.Current = null; break; case EntityState.Unchanged: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, ModifiedPropertiesBehavior.NoneModified); this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, ModifiedPropertiesBehavior.NoneModified); break; case EntityState.Modified: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, ModifiedPropertiesBehavior.SomeModified); this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, ModifiedPropertiesBehavior.SomeModified); break; case EntityState.Added: this.Original = null; this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, ModifiedPropertiesBehavior.AllModified); break; default: Debug.Fail("unexpected IEntityStateEntry.State for entity " + stateEntry.State); this.Original = null; this.Current = null; break; } } } } // 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
- GridItemPatternIdentifiers.cs
- _Rfc2616CacheValidators.cs
- Accessors.cs
- TextParaLineResult.cs
- DataViewManager.cs
- UpdatePanelTrigger.cs
- XmlWrappingReader.cs
- HtmlGenericControl.cs
- SchemaNames.cs
- UIElement3DAutomationPeer.cs
- EntityDataSourceState.cs
- ServiceModelStringsVersion1.cs
- SyndicationItem.cs
- SafePipeHandle.cs
- UserPreferenceChangedEventArgs.cs
- TagNameToTypeMapper.cs
- mediaeventshelper.cs
- XmlDataSourceNodeDescriptor.cs
- ServiceOperation.cs
- ValueTypeFixupInfo.cs
- TextBlock.cs
- DataGridViewColumnCollectionEditor.cs
- PageAdapter.cs
- InvalidateEvent.cs
- Vector3D.cs
- DSASignatureDeformatter.cs
- CompoundFileStorageReference.cs
- SerializationObjectManager.cs
- ConnectionProviderAttribute.cs
- ReceiveDesigner.xaml.cs
- DbDataSourceEnumerator.cs
- SafeHGlobalHandleCritical.cs
- EmbeddedMailObject.cs
- UnsafeMethods.cs
- ToolStripContentPanelRenderEventArgs.cs
- MissingFieldException.cs
- XmlTextEncoder.cs
- _ListenerResponseStream.cs
- ThreadExceptionEvent.cs
- TraceListeners.cs
- ListViewItemMouseHoverEvent.cs
- LazyTextWriterCreator.cs
- ContainerSelectorGlyph.cs
- GradientStopCollection.cs
- ShapeTypeface.cs
- DataGridViewHitTestInfo.cs
- EventMap.cs
- ReadWriteSpinLock.cs
- StateMachineDesignerPaint.cs
- XamlClipboardData.cs
- MultiPageTextView.cs
- OpCodes.cs
- ContentAlignmentEditor.cs
- InstanceDescriptor.cs
- EdmValidator.cs
- SignatureResourcePool.cs
- EnumType.cs
- SchemaSetCompiler.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- HandleRef.cs
- SchemaNotation.cs
- DataTable.cs
- DataGridLinkButton.cs
- ColumnMapTranslator.cs
- SecurityElement.cs
- DataGridCaption.cs
- TableRowGroupCollection.cs
- UIElementParagraph.cs
- CompilerError.cs
- RoleService.cs
- TableProviderWrapper.cs
- CaretElement.cs
- ScriptIgnoreAttribute.cs
- CssClassPropertyAttribute.cs
- OleDbErrorCollection.cs
- OleDbConnectionFactory.cs
- BasicCellRelation.cs
- path.cs
- SessionStateSection.cs
- DbCommandDefinition.cs
- HTMLTextWriter.cs
- SByteConverter.cs
- PeerMaintainer.cs
- ResourceContainer.cs
- ServiceManagerHandle.cs
- RefreshInfo.cs
- StorageEntityContainerMapping.cs
- TaskFactory.cs
- TreeNodeCollectionEditor.cs
- SQLSingle.cs
- DataSourceXmlClassAttribute.cs
- DataGridViewComboBoxColumn.cs
- DoubleAnimationBase.cs
- AesManaged.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- InputBindingCollection.cs
- UnsafeNativeMethods.cs
- Nullable.cs
- ReadOnlyDataSource.cs
- SelectionItemPatternIdentifiers.cs