Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / RelationshipFixer.cs / 2 / RelationshipFixer.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Metadata.Edm; namespace System.Data.Objects.DataClasses { [Serializable] internal class RelationshipFixer: IRelationshipFixer where TSourceEntity : class, IEntityWithRelationships where TTargetEntity : class, IEntityWithRelationships { // The following fields are serialized. Adding or removing a serialized field is considered // a breaking change. This includes changing the field type or field name of existing // serialized fields. If you need to make this kind of change, it may be possible, but it // will require some custom serialization/deserialization code. RelationshipMultiplicity _sourceRoleMultiplicity; RelationshipMultiplicity _targetRoleMultiplicity; internal RelationshipFixer(RelationshipMultiplicity sourceRoleMultiplicity, RelationshipMultiplicity targetRoleMultiplicity) { _sourceRoleMultiplicity = sourceRoleMultiplicity; _targetRoleMultiplicity = targetRoleMultiplicity; } /// /// Used during relationship fixup when the source end of the relationship is not /// yet in the relationships list, and needs to be created /// /// RelationshipNavigation to be set on new RelatedEnd /// RelationshipManager to use for creating the new end ///Reference to the new collection or reference on the other end of the relationship RelatedEnd IRelationshipFixer.CreateSourceEnd(RelationshipNavigation navigation, RelationshipManager relationshipManager) { return relationshipManager.CreateRelatedEnd(navigation, _targetRoleMultiplicity, _sourceRoleMultiplicity, /*existingRelatedEnd*/ null); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Metadata.Edm; namespace System.Data.Objects.DataClasses { [Serializable] internal class RelationshipFixer: IRelationshipFixer where TSourceEntity : class, IEntityWithRelationships where TTargetEntity : class, IEntityWithRelationships { // The following fields are serialized. Adding or removing a serialized field is considered // a breaking change. This includes changing the field type or field name of existing // serialized fields. If you need to make this kind of change, it may be possible, but it // will require some custom serialization/deserialization code. RelationshipMultiplicity _sourceRoleMultiplicity; RelationshipMultiplicity _targetRoleMultiplicity; internal RelationshipFixer(RelationshipMultiplicity sourceRoleMultiplicity, RelationshipMultiplicity targetRoleMultiplicity) { _sourceRoleMultiplicity = sourceRoleMultiplicity; _targetRoleMultiplicity = targetRoleMultiplicity; } /// /// Used during relationship fixup when the source end of the relationship is not /// yet in the relationships list, and needs to be created /// /// RelationshipNavigation to be set on new RelatedEnd /// RelationshipManager to use for creating the new end ///Reference to the new collection or reference on the other end of the relationship RelatedEnd IRelationshipFixer.CreateSourceEnd(RelationshipNavigation navigation, RelationshipManager relationshipManager) { return relationshipManager.CreateRelatedEnd(navigation, _targetRoleMultiplicity, _sourceRoleMultiplicity, /*existingRelatedEnd*/ null); } } } // 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
- AuthorizationRule.cs
- COM2ColorConverter.cs
- TransformConverter.cs
- DataListItemCollection.cs
- EdmProperty.cs
- ComboBoxRenderer.cs
- DataGridCellItemAutomationPeer.cs
- Attributes.cs
- PngBitmapEncoder.cs
- XmlNode.cs
- DataSourceComponent.cs
- AvTrace.cs
- ClientViaElement.cs
- storagemappingitemcollection.viewdictionary.cs
- SelectQueryOperator.cs
- XmlDownloadManager.cs
- DynamicRendererThreadManager.cs
- PKCS1MaskGenerationMethod.cs
- UIElementParaClient.cs
- DiscoveryClientProtocol.cs
- TextRunProperties.cs
- ChtmlLinkAdapter.cs
- mactripleDES.cs
- SecureStringHasher.cs
- UnicastIPAddressInformationCollection.cs
- RubberbandSelector.cs
- InlineUIContainer.cs
- SafeProcessHandle.cs
- SiteMapDataSourceView.cs
- DataServiceClientException.cs
- RightNameExpirationInfoPair.cs
- RoleManagerSection.cs
- DtrList.cs
- CompiledELinqQueryState.cs
- EmbeddedObject.cs
- PixelShader.cs
- Accessors.cs
- ItemsControlAutomationPeer.cs
- safemediahandle.cs
- EntitySetBase.cs
- ResourceReferenceKeyNotFoundException.cs
- HttpHandlerActionCollection.cs
- EntityDesignPluralizationHandler.cs
- FieldBuilder.cs
- MaterializeFromAtom.cs
- counter.cs
- NameTable.cs
- SiteMembershipCondition.cs
- StatusBarItemAutomationPeer.cs
- SqlDataAdapter.cs
- WebPartManagerInternals.cs
- FormatterConverter.cs
- NamedPipeConnectionPoolSettingsElement.cs
- documentsequencetextpointer.cs
- Vector3DAnimationUsingKeyFrames.cs
- PointConverter.cs
- ProcessInputEventArgs.cs
- XmlElementList.cs
- SecuritySessionServerSettings.cs
- ByteKeyFrameCollection.cs
- designeractionbehavior.cs
- Timer.cs
- WebPartVerbCollection.cs
- TransactedBatchContext.cs
- TextSpanModifier.cs
- PrintPreviewDialog.cs
- TreeNodeStyle.cs
- QilLiteral.cs
- EntityAdapter.cs
- ViewBox.cs
- URL.cs
- WebPartManager.cs
- AbsoluteQuery.cs
- TextTreeInsertElementUndoUnit.cs
- EpmContentSerializer.cs
- IIS7ConfigurationLoader.cs
- DataGridItemAttachedStorage.cs
- documentation.cs
- HttpRuntime.cs
- OdbcConnection.cs
- TemplateLookupAction.cs
- ToolbarAUtomationPeer.cs
- PeerSecurityManager.cs
- HostedTcpTransportManager.cs
- Closure.cs
- WindowsListViewItem.cs
- X509ChainPolicy.cs
- TemplateParser.cs
- SerializationSectionGroup.cs
- ClientRuntimeConfig.cs
- NegatedCellConstant.cs
- Model3D.cs
- SvcMapFileSerializer.cs
- StaticExtension.cs
- QueryStatement.cs
- Rules.cs
- EventHandlerList.cs
- ListenerElementsCollection.cs
- PeerCollaboration.cs
- MenuTracker.cs