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
- SettingsBindableAttribute.cs
- WindowsTitleBar.cs
- DataGridLength.cs
- AutomationPropertyInfo.cs
- ProfileGroupSettingsCollection.cs
- WorkflowRuntimeEndpoint.cs
- DefaultMemberAttribute.cs
- TileModeValidation.cs
- DynamicRendererThreadManager.cs
- HuffmanTree.cs
- counter.cs
- InternalDispatchObject.cs
- UrlMappingsSection.cs
- HttpWebRequest.cs
- RectangleHotSpot.cs
- BrowserCapabilitiesCompiler.cs
- PeerNameResolver.cs
- Point3DAnimationBase.cs
- QueryNode.cs
- TimeoutHelper.cs
- RightsManagementEncryptionTransform.cs
- GridViewCancelEditEventArgs.cs
- OneOf.cs
- SqlCrossApplyToCrossJoin.cs
- AppSettingsSection.cs
- BlurEffect.cs
- Polyline.cs
- EnvironmentPermission.cs
- SqlConnectionString.cs
- MetafileHeader.cs
- VariantWrapper.cs
- AccessibleObject.cs
- SystemKeyConverter.cs
- ParsedAttributeCollection.cs
- WebPartMinimizeVerb.cs
- X509AsymmetricSecurityKey.cs
- DragCompletedEventArgs.cs
- VerificationException.cs
- BinaryNode.cs
- Fonts.cs
- QilChoice.cs
- RadioButton.cs
- OleDbConnectionFactory.cs
- SetIterators.cs
- DecoderFallback.cs
- RunClient.cs
- MemberPath.cs
- ArgumentException.cs
- TeredoHelper.cs
- BitmapEffectInput.cs
- DataGridViewAccessibleObject.cs
- ListViewItemEventArgs.cs
- InvalidCastException.cs
- TrackingWorkflowEventArgs.cs
- SafeWaitHandle.cs
- ServiceOperationHelpers.cs
- BooleanStorage.cs
- DbProviderFactories.cs
- Brushes.cs
- MenuScrollingVisibilityConverter.cs
- WhitespaceSignificantCollectionAttribute.cs
- SelectorItemAutomationPeer.cs
- DocumentPage.cs
- GetPageCompletedEventArgs.cs
- WindowsGrip.cs
- InstanceNormalEvent.cs
- PhoneCallDesigner.cs
- HotSpot.cs
- Publisher.cs
- KeyValueSerializer.cs
- DataBinding.cs
- DataGridViewRowStateChangedEventArgs.cs
- Font.cs
- NamedElement.cs
- XmlDataImplementation.cs
- ImmutablePropertyDescriptorGridEntry.cs
- BitStack.cs
- BaseTemplateParser.cs
- TransformerTypeCollection.cs
- OdbcParameter.cs
- IdentityVerifier.cs
- FontNamesConverter.cs
- GenericWebPart.cs
- Serializer.cs
- ObjectContextServiceProvider.cs
- AudioFormatConverter.cs
- TaskFactory.cs
- UserControlBuildProvider.cs
- XmlSchemaProviderAttribute.cs
- DataGridPagerStyle.cs
- EntitySetDataBindingList.cs
- DetailsViewModeEventArgs.cs
- Win32NamedPipes.cs
- FormClosedEvent.cs
- SecurityIdentifierElement.cs
- DescriptionAttribute.cs
- HyperLinkColumn.cs
- HostingEnvironment.cs
- DirectoryInfo.cs
- TableLayoutPanel.cs