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
- TreeIterator.cs
- XamlTypeMapperSchemaContext.cs
- StyleCollection.cs
- ModelItemImpl.cs
- ModelProperty.cs
- XamlRtfConverter.cs
- ReferenceConverter.cs
- ScriptComponentDescriptor.cs
- MasterPageCodeDomTreeGenerator.cs
- ReadContentAsBinaryHelper.cs
- SyntaxCheck.cs
- OdbcCommandBuilder.cs
- StringExpressionSet.cs
- ToolBarPanel.cs
- SqlNodeTypeOperators.cs
- TextHintingModeValidation.cs
- MenuItemCollection.cs
- SafeArrayRankMismatchException.cs
- UnsignedPublishLicense.cs
- Helper.cs
- SHA512Managed.cs
- TraceSwitch.cs
- DbDataAdapter.cs
- ConditionalAttribute.cs
- CommentEmitter.cs
- HttpTransportManager.cs
- DeflateStream.cs
- RbTree.cs
- InputEventArgs.cs
- Publisher.cs
- X509IssuerSerialKeyIdentifierClause.cs
- CompressEmulationStream.cs
- HTTPNotFoundHandler.cs
- followingquery.cs
- SqlDataSourceStatusEventArgs.cs
- ImageIndexEditor.cs
- BindingExpression.cs
- ConditionBrowserDialog.cs
- EntryPointNotFoundException.cs
- ButtonChrome.cs
- WebProxyScriptElement.cs
- CompilerWrapper.cs
- TokenCreationException.cs
- SqlWebEventProvider.cs
- TableCellAutomationPeer.cs
- ConnectionStringsExpressionBuilder.cs
- DataGridViewButtonCell.cs
- VersionedStreamOwner.cs
- MbpInfo.cs
- Panel.cs
- BinaryCommonClasses.cs
- IListConverters.cs
- ButtonDesigner.cs
- WebServiceResponse.cs
- DbConnectionPoolOptions.cs
- TimeSpanMinutesConverter.cs
- AnnotationService.cs
- ToolStripDropDownItem.cs
- IntegerValidatorAttribute.cs
- MessageLogTraceRecord.cs
- RelationshipConverter.cs
- TextTrailingWordEllipsis.cs
- RootProfilePropertySettingsCollection.cs
- MethodImplAttribute.cs
- ListViewGroupItemCollection.cs
- ClientBuildManagerCallback.cs
- _HelperAsyncResults.cs
- SQLResource.cs
- RangeValueProviderWrapper.cs
- NGCSerializerAsync.cs
- AutomationEvent.cs
- WmfPlaceableFileHeader.cs
- SqlSelectStatement.cs
- CryptoApi.cs
- ComponentSerializationService.cs
- PopupRootAutomationPeer.cs
- DataProtection.cs
- Helpers.cs
- ObjectToken.cs
- RowUpdatingEventArgs.cs
- EndpointDiscoveryMetadataCD1.cs
- SafeUserTokenHandle.cs
- DeviceFilterEditorDialog.cs
- NavigationProperty.cs
- StringDictionary.cs
- MatrixAnimationBase.cs
- MobileControlsSectionHandler.cs
- SerializationObjectManager.cs
- BezierSegment.cs
- ChameleonKey.cs
- DynamicVirtualDiscoSearcher.cs
- AuthenticationConfig.cs
- TrimSurroundingWhitespaceAttribute.cs
- Ports.cs
- LinkConverter.cs
- CellTreeNodeVisitors.cs
- ExpressionTextBox.xaml.cs
- AvTraceFormat.cs
- DataGridViewColumnCollection.cs
- BrowserInteropHelper.cs