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
- SafeArrayRankMismatchException.cs
- DockPattern.cs
- UidManager.cs
- AlphaSortedEnumConverter.cs
- SystemTcpConnection.cs
- TypeContext.cs
- BaseTreeIterator.cs
- HashMembershipCondition.cs
- EventDescriptor.cs
- RotateTransform.cs
- Point3D.cs
- FormsAuthenticationCredentials.cs
- DescendantOverDescendantQuery.cs
- RemotingAttributes.cs
- IndicShape.cs
- ManualResetEvent.cs
- PtsHost.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- SqlDataSourceQueryEditorForm.cs
- CurrencyManager.cs
- TreeBuilderBamlTranslator.cs
- Size3D.cs
- StringArrayConverter.cs
- ManagementDateTime.cs
- ExpressionEditorAttribute.cs
- Merger.cs
- IdentifierService.cs
- ContentElement.cs
- IFormattable.cs
- NoneExcludedImageIndexConverter.cs
- FrameworkTemplate.cs
- TableLayoutColumnStyleCollection.cs
- AnnotationDocumentPaginator.cs
- DataServiceQueryProvider.cs
- ToggleButton.cs
- AddInControllerImpl.cs
- Model3DGroup.cs
- TransformerInfo.cs
- Pen.cs
- OperatingSystem.cs
- OutputCacheSection.cs
- RawStylusSystemGestureInputReport.cs
- autovalidator.cs
- OutOfMemoryException.cs
- HtmlGenericControl.cs
- RotateTransform.cs
- ZipIOCentralDirectoryBlock.cs
- DynamicFilter.cs
- SoapDocumentServiceAttribute.cs
- Token.cs
- DefaultAuthorizationContext.cs
- RefreshInfo.cs
- TextWriterTraceListener.cs
- CompositeDataBoundControl.cs
- WrappedKeySecurityToken.cs
- WorkflowDispatchContext.cs
- DataGridItem.cs
- SqlUtils.cs
- ExpressionConverter.cs
- GeneratedView.cs
- RoutedUICommand.cs
- ImpersonateTokenRef.cs
- FormatSettings.cs
- UMPAttributes.cs
- FtpWebRequest.cs
- TimerEventSubscriptionCollection.cs
- RegionIterator.cs
- ExpandCollapseIsCheckedConverter.cs
- EntityTemplateUserControl.cs
- OutputCacheModule.cs
- SqlResolver.cs
- WebPart.cs
- LocatorBase.cs
- NegotiationTokenAuthenticator.cs
- QilSortKey.cs
- IdentitySection.cs
- Simplifier.cs
- HttpRuntimeSection.cs
- StrongNameUtility.cs
- DropShadowEffect.cs
- XmlSchemaAttributeGroupRef.cs
- XmlSchemaGroup.cs
- DbSourceCommand.cs
- ModelTreeEnumerator.cs
- DictionaryEntry.cs
- FocusManager.cs
- ConnectionConsumerAttribute.cs
- HyperLinkStyle.cs
- CodeIndexerExpression.cs
- AutomationPeer.cs
- ProfileInfo.cs
- GrammarBuilderBase.cs
- FrameworkElementFactory.cs
- MiniCustomAttributeInfo.cs
- CopyOfAction.cs
- DrawingServices.cs
- WebPartDescription.cs
- _NestedSingleAsyncResult.cs
- SignedXml.cs
- RoleManagerSection.cs