Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Map / Update / Internal / ExtractedStateEntry.cs / 1 / 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, null /* indicates all properties are modified */); this.Current = null; break; case EntityState.Unchanged: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, Enumerable.Empty() /* indicates no properties are modified */); this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, Enumerable.Empty ()); break; case EntityState.Modified: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, stateEntry.GetModifiedProperties()); this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, stateEntry.GetModifiedProperties()); break; case EntityState.Added: this.Original = null; this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, null /* indicates all properties are modified */); 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. //---------------------------------------------------------------------- // // 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, null /* indicates all properties are modified */); this.Current = null; break; case EntityState.Unchanged: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, Enumerable.Empty() /* indicates no properties are modified */); this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, Enumerable.Empty ()); break; case EntityState.Modified: this.Original = translator.RecordConverter.ConvertOriginalValuesToPropagatorResult( stateEntry, stateEntry.GetModifiedProperties()); this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, stateEntry.GetModifiedProperties()); break; case EntityState.Added: this.Original = null; this.Current = translator.RecordConverter.ConvertCurrentValuesToPropagatorResult( stateEntry, null /* indicates all properties are modified */); 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
- SchemaCollectionCompiler.cs
- DesignerLoader.cs
- XmlTextReader.cs
- UserNameSecurityTokenParameters.cs
- Internal.cs
- BasicCellRelation.cs
- WaitForChangedResult.cs
- PipeStream.cs
- ReadWriteSpinLock.cs
- WindowsProgressbar.cs
- DictionaryEntry.cs
- GeneralTransform2DTo3D.cs
- PartialClassGenerationTaskInternal.cs
- InternalBufferOverflowException.cs
- HWStack.cs
- XmlTypeAttribute.cs
- ProcessManager.cs
- RichTextBoxConstants.cs
- EntityContainerEmitter.cs
- TreePrinter.cs
- ModelItemCollectionImpl.cs
- GeometryHitTestResult.cs
- HtmlInputHidden.cs
- ClientSideProviderDescription.cs
- String.cs
- UndoManager.cs
- ConnectionString.cs
- SkinIDTypeConverter.cs
- FillBehavior.cs
- Expressions.cs
- LoginCancelEventArgs.cs
- EndPoint.cs
- login.cs
- _NetRes.cs
- ClientScriptItem.cs
- GeometryGroup.cs
- CodeNamespaceImportCollection.cs
- CredentialSelector.cs
- FileDialog.cs
- FontFaceLayoutInfo.cs
- VoiceSynthesis.cs
- DataControlField.cs
- ParentQuery.cs
- ContentPlaceHolder.cs
- ViewBase.cs
- ConfigXmlSignificantWhitespace.cs
- DesignerGeometryHelper.cs
- SafeHandles.cs
- WSFederationHttpSecurity.cs
- DataGridColumnHeader.cs
- Rfc4050KeyFormatter.cs
- TableRowGroup.cs
- SchemaMerger.cs
- RubberbandSelector.cs
- XamlTypeMapper.cs
- Parameter.cs
- DbMetaDataFactory.cs
- EnumerableValidator.cs
- LiteralControl.cs
- WpfXamlLoader.cs
- XmlElementList.cs
- MergeFilterQuery.cs
- SQLDecimal.cs
- WindowPatternIdentifiers.cs
- ValidationHelpers.cs
- HMACMD5.cs
- ScriptComponentDescriptor.cs
- ProcessHost.cs
- VarRefManager.cs
- OdbcErrorCollection.cs
- DataServiceHostWrapper.cs
- SyndicationItemFormatter.cs
- DeferredBinaryDeserializerExtension.cs
- DesignerContextDescriptor.cs
- LinqToSqlWrapper.cs
- objectquery_tresulttype.cs
- ReturnEventArgs.cs
- ProviderConnectionPoint.cs
- VisualCollection.cs
- FrameSecurityDescriptor.cs
- CodeCatchClauseCollection.cs
- WebServiceClientProxyGenerator.cs
- AsyncSerializedWorker.cs
- GeneralTransform2DTo3DTo2D.cs
- CompiledRegexRunnerFactory.cs
- HttpPostedFileWrapper.cs
- ActiveDocumentEvent.cs
- XmlArrayItemAttributes.cs
- ObjectQuery_EntitySqlExtensions.cs
- CustomTypeDescriptor.cs
- NativeCompoundFileAPIs.cs
- Cursors.cs
- WindowAutomationPeer.cs
- InstanceOwnerQueryResult.cs
- SimpleWebHandlerParser.cs
- HtmlControl.cs
- ArrayExtension.cs
- DocumentOutline.cs
- CodePropertyReferenceExpression.cs
- CreateUserErrorEventArgs.cs