Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- OrderPreservingPipeliningSpoolingTask.cs
- PermissionListSet.cs
- PointAnimationClockResource.cs
- AddressUtility.cs
- BinaryObjectInfo.cs
- InkPresenter.cs
- _ListenerAsyncResult.cs
- RemotingSurrogateSelector.cs
- TableHeaderCell.cs
- ContextStaticAttribute.cs
- XhtmlTextWriter.cs
- StorageComplexPropertyMapping.cs
- RelationshipConstraintValidator.cs
- PtsHost.cs
- DockingAttribute.cs
- LoginCancelEventArgs.cs
- WaitHandle.cs
- MemoryStream.cs
- InternalMappingException.cs
- DataRowChangeEvent.cs
- CheckBoxBaseAdapter.cs
- ContextMenuAutomationPeer.cs
- EDesignUtil.cs
- BindableAttribute.cs
- EntityDataReader.cs
- PrimitiveSchema.cs
- Type.cs
- BaseAddressPrefixFilterElementCollection.cs
- Parameter.cs
- ContentPresenter.cs
- ResourceContainer.cs
- HostAdapter.cs
- DbConnectionStringCommon.cs
- CompensationToken.cs
- EditingCoordinator.cs
- CompilerHelpers.cs
- InkCanvasSelectionAdorner.cs
- DefaultShape.cs
- DispatchWrapper.cs
- AlphabeticalEnumConverter.cs
- RemoteCryptoTokenProvider.cs
- DiscardableAttribute.cs
- ConnectionManagementElementCollection.cs
- NotifyInputEventArgs.cs
- DispatcherHooks.cs
- RotateTransform3D.cs
- DataBindingHandlerAttribute.cs
- ImageMetadata.cs
- SpellCheck.cs
- ValidatorCompatibilityHelper.cs
- RecommendedAsConfigurableAttribute.cs
- SocketPermission.cs
- InplaceBitmapMetadataWriter.cs
- CheckBoxFlatAdapter.cs
- WindowsSolidBrush.cs
- SafeMILHandle.cs
- ExpressionsCollectionConverter.cs
- TrustManagerMoreInformation.cs
- StateMachineExecutionState.cs
- PeerEndPoint.cs
- ChildTable.cs
- ObjectQueryProvider.cs
- MissingMemberException.cs
- SingleAnimation.cs
- DetailsView.cs
- IOException.cs
- PathTooLongException.cs
- FloaterParaClient.cs
- FastEncoder.cs
- TextEditorTables.cs
- RadioButton.cs
- AccessText.cs
- DelegatedStream.cs
- DetailsViewDeleteEventArgs.cs
- GotoExpression.cs
- ProfileParameter.cs
- HttpHeaderCollection.cs
- ResourceReferenceExpression.cs
- IUnknownConstantAttribute.cs
- SchemaElement.cs
- StylusPlugInCollection.cs
- NamedElement.cs
- NonBatchDirectoryCompiler.cs
- LocatorPartList.cs
- IsolatedStorage.cs
- ScriptServiceAttribute.cs
- VectorKeyFrameCollection.cs
- XmlWrappingReader.cs
- GridViewCancelEditEventArgs.cs
- FileDetails.cs
- ParallelEnumerable.cs
- WorkflowOwnershipException.cs
- DefaultProxySection.cs
- ToolStripDropDownButton.cs
- TreeView.cs
- VisualTarget.cs
- WsdlBuildProvider.cs
- XPathParser.cs
- HtmlInputCheckBox.cs
- SmiEventSink_Default.cs