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 / Objects / DataClasses / RelationshipFixer.cs / 1 / 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
- _SslState.cs
- GridViewCellAutomationPeer.cs
- ParserContext.cs
- StrongNameMembershipCondition.cs
- Marshal.cs
- ServiceMetadataContractBehavior.cs
- Label.cs
- DesignerWebPartChrome.cs
- shaperfactory.cs
- RecipientInfo.cs
- PathTooLongException.cs
- AttachedAnnotation.cs
- GestureRecognizer.cs
- pingexception.cs
- XmlWrappingReader.cs
- CssClassPropertyAttribute.cs
- ConfigurationPermission.cs
- ConfigsHelper.cs
- TargetInvocationException.cs
- TreeNodeBinding.cs
- TablePattern.cs
- TableCell.cs
- WindowInteractionStateTracker.cs
- ThaiBuddhistCalendar.cs
- ObjectPersistData.cs
- Collection.cs
- SelectionProviderWrapper.cs
- COM2FontConverter.cs
- PointHitTestResult.cs
- Missing.cs
- ContractMapping.cs
- FunctionMappingTranslator.cs
- ToolStripRenderEventArgs.cs
- SweepDirectionValidation.cs
- DispatcherExceptionFilterEventArgs.cs
- SettingsProviderCollection.cs
- ToolBarTray.cs
- FormViewDeleteEventArgs.cs
- DBCommandBuilder.cs
- QueuedDeliveryRequirementsMode.cs
- DataGridCaption.cs
- CollectionsUtil.cs
- TypeDelegator.cs
- TreeViewDataItemAutomationPeer.cs
- WrapperEqualityComparer.cs
- SecUtil.cs
- TdsParserStaticMethods.cs
- FactoryRecord.cs
- DataBoundLiteralControl.cs
- AutomationElement.cs
- MergeEnumerator.cs
- Double.cs
- MasterPageBuildProvider.cs
- LinkedResource.cs
- ValueConversionAttribute.cs
- Behavior.cs
- WebBaseEventKeyComparer.cs
- ImageMap.cs
- ProviderBase.cs
- CryptoSession.cs
- Types.cs
- IOException.cs
- PrimitiveType.cs
- ResourceBinder.cs
- PingOptions.cs
- ResXFileRef.cs
- SqlNodeAnnotations.cs
- _SSPISessionCache.cs
- ExpressionQuoter.cs
- SplashScreen.cs
- TabControl.cs
- Columns.cs
- ICollection.cs
- NonNullItemCollection.cs
- ConsoleTraceListener.cs
- CodeTypeReferenceCollection.cs
- XmlWrappingWriter.cs
- SiteMapNodeCollection.cs
- SystemMulticastIPAddressInformation.cs
- RootBuilder.cs
- CompressEmulationStream.cs
- UdpSocketReceiveManager.cs
- DefaultBinder.cs
- DataTable.cs
- ReachIDocumentPaginatorSerializer.cs
- DataGridViewRow.cs
- Helpers.cs
- ScriptComponentDescriptor.cs
- CoreChannel.cs
- Shape.cs
- SoapCodeExporter.cs
- ButtonField.cs
- DiscardableAttribute.cs
- CodeExpressionCollection.cs
- Mouse.cs
- ISAPIApplicationHost.cs
- SoapAttributeOverrides.cs
- webclient.cs
- PermissionListSet.cs
- RegexRunner.cs