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
- Utils.cs
- MetadataUtilsSmi.cs
- GatewayDefinition.cs
- ManagedWndProcTracker.cs
- WinEventTracker.cs
- ObjectParameter.cs
- NavigationWindowAutomationPeer.cs
- LocatorGroup.cs
- ExtenderProviderService.cs
- Italic.cs
- LinqDataSourceInsertEventArgs.cs
- ComEventsMethod.cs
- SpanIndex.cs
- Help.cs
- ConversionContext.cs
- MimeParameterWriter.cs
- CounterCreationDataCollection.cs
- MetadataResolver.cs
- WhitespaceRule.cs
- ReadOnlyCollection.cs
- FixedPage.cs
- SafeSerializationManager.cs
- HwndSubclass.cs
- AttributeEmitter.cs
- NativeMethods.cs
- BaseEntityWrapper.cs
- LateBoundBitmapDecoder.cs
- coordinatorscratchpad.cs
- DependencyObjectProvider.cs
- EditorZoneBase.cs
- CompoundFileDeflateTransform.cs
- ToolStripGripRenderEventArgs.cs
- OciHandle.cs
- KeyValueSerializer.cs
- UpdateManifestForBrowserApplication.cs
- RtfControlWordInfo.cs
- DataConnectionHelper.cs
- ShaderEffect.cs
- XmlArrayAttribute.cs
- BitmapEffectGroup.cs
- HebrewNumber.cs
- DiscoveryClientChannelBase.cs
- Int32CAMarshaler.cs
- XslUrlEditor.cs
- RangeValidator.cs
- NameSpaceExtractor.cs
- SafeSecurityHandles.cs
- ValueChangedEventManager.cs
- StylusPlugInCollection.cs
- SingleBodyParameterMessageFormatter.cs
- SslStream.cs
- DataGridViewUtilities.cs
- PerformanceCounterLib.cs
- DesignerView.xaml.cs
- SuppressMergeCheckAttribute.cs
- FormParameter.cs
- FullTextLine.cs
- AccessViolationException.cs
- AddInProcess.cs
- AtomMaterializerLog.cs
- DataServiceExpressionVisitor.cs
- UnsafeNativeMethodsTablet.cs
- ToolZone.cs
- PanelDesigner.cs
- MenuItem.cs
- AnnotationDocumentPaginator.cs
- SizeIndependentAnimationStorage.cs
- NumberSubstitution.cs
- RemoveStoryboard.cs
- UIElementAutomationPeer.cs
- DataGridViewRowsAddedEventArgs.cs
- XmlSignatureProperties.cs
- UdpDiscoveryEndpointElement.cs
- RenderingEventArgs.cs
- FileLevelControlBuilderAttribute.cs
- EdmPropertyAttribute.cs
- FontSourceCollection.cs
- MessageAction.cs
- DrawingContextWalker.cs
- XmlValidatingReader.cs
- TransactionManager.cs
- ObjectDataSourceEventArgs.cs
- PageTheme.cs
- Timer.cs
- DebugTrace.cs
- FixedSchema.cs
- ToggleButton.cs
- CalendarDateChangedEventArgs.cs
- AggregateNode.cs
- ZipIOModeEnforcingStream.cs
- StringFreezingAttribute.cs
- DBCSCodePageEncoding.cs
- Vector3DAnimationUsingKeyFrames.cs
- ContentOperations.cs
- Registry.cs
- SizeConverter.cs
- DocumentSequence.cs
- ChameleonKey.cs
- TableRowCollection.cs
- webclient.cs