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
- UrlMappingsSection.cs
- SettingsPropertyValue.cs
- FormViewPageEventArgs.cs
- TypeHelpers.cs
- ProfileServiceManager.cs
- TextStore.cs
- IgnoreFlushAndCloseStream.cs
- SplineQuaternionKeyFrame.cs
- FormsAuthenticationUserCollection.cs
- HtmlTernaryTree.cs
- QueryMatcher.cs
- CompilerCollection.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- TdsParameterSetter.cs
- HttpCacheVaryByContentEncodings.cs
- GridViewSortEventArgs.cs
- UserMapPath.cs
- itemelement.cs
- PassportAuthentication.cs
- ColumnMapProcessor.cs
- RemotingConfiguration.cs
- DataGridViewControlCollection.cs
- SessionStateModule.cs
- TypeToken.cs
- PersonalizationProvider.cs
- Application.cs
- NavigationPropertyAccessor.cs
- DataRowView.cs
- DatagridviewDisplayedBandsData.cs
- InvalidOleVariantTypeException.cs
- SubclassTypeValidator.cs
- FontFaceLayoutInfo.cs
- PointConverter.cs
- ToolStripOverflow.cs
- CurrentChangingEventManager.cs
- Base64Stream.cs
- MenuAdapter.cs
- ProfileBuildProvider.cs
- MultipleViewProviderWrapper.cs
- UTF32Encoding.cs
- DbReferenceCollection.cs
- figurelength.cs
- SymLanguageVendor.cs
- RemotingException.cs
- BufferAllocator.cs
- StyleCollection.cs
- MembershipValidatePasswordEventArgs.cs
- SessionEndingEventArgs.cs
- AnimationClock.cs
- DataGridViewSelectedColumnCollection.cs
- ShaderEffect.cs
- DataKey.cs
- ListViewItemSelectionChangedEvent.cs
- ProxyAttribute.cs
- HttpStreamXmlDictionaryWriter.cs
- RtType.cs
- SiteMap.cs
- GenericIdentity.cs
- DataGridViewRowEventArgs.cs
- ConnectionsZoneDesigner.cs
- WebPartConnectVerb.cs
- VisualBasicSettingsConverter.cs
- TextInfo.cs
- RoutedEventValueSerializer.cs
- MediaScriptCommandRoutedEventArgs.cs
- TextRangeEditLists.cs
- PerformanceCounterPermissionEntry.cs
- MethodImplAttribute.cs
- TextStore.cs
- NetMsmqSecurity.cs
- SystemIPv4InterfaceProperties.cs
- DesignerAutoFormatStyle.cs
- WorkflowWebService.cs
- RelationalExpressions.cs
- DrawListViewSubItemEventArgs.cs
- TouchesOverProperty.cs
- SizeF.cs
- UiaCoreProviderApi.cs
- ProcessDesigner.cs
- TypeListConverter.cs
- UniqueID.cs
- EntryPointNotFoundException.cs
- SoapMessage.cs
- AssemblyBuilder.cs
- SingleConverter.cs
- TypedTableBase.cs
- DefaultClaimSet.cs
- OdbcParameter.cs
- ToolBar.cs
- PersistenceProviderBehavior.cs
- SourceElementsCollection.cs
- BinaryWriter.cs
- HWStack.cs
- XhtmlBasicPanelAdapter.cs
- _KerberosClient.cs
- Relationship.cs
- FormsAuthenticationTicket.cs
- StreamDocument.cs
- TemplateControlCodeDomTreeGenerator.cs
- Comparer.cs