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
- SourceChangedEventArgs.cs
- _BasicClient.cs
- MSAANativeProvider.cs
- ServerIdentity.cs
- Walker.cs
- SpotLight.cs
- ProfileParameter.cs
- SmtpCommands.cs
- ExpandedWrapper.cs
- base64Transforms.cs
- WinEventHandler.cs
- TrackingStringDictionary.cs
- ObjectDataSourceFilteringEventArgs.cs
- VariableAction.cs
- PeerNodeTraceRecord.cs
- SQLInt16.cs
- ExclusiveNamedPipeTransportManager.cs
- RuleSettings.cs
- DataControlHelper.cs
- TableLayoutPanelResizeGlyph.cs
- Accessible.cs
- _ListenerRequestStream.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- WebPartsSection.cs
- DataSourceGroupCollection.cs
- ColumnCollection.cs
- mongolianshape.cs
- WindowsTokenRoleProvider.cs
- TextFormatter.cs
- XmlWriter.cs
- HttpListener.cs
- ReflectionHelper.cs
- FixedStringLookup.cs
- BitConverter.cs
- InvokeSchedule.cs
- FontCollection.cs
- ExeContext.cs
- SqlConnection.cs
- HtmlLink.cs
- XmlnsPrefixAttribute.cs
- TableHeaderCell.cs
- Property.cs
- ArglessEventHandlerProxy.cs
- Menu.cs
- FrameworkPropertyMetadata.cs
- ProfileBuildProvider.cs
- DisplayInformation.cs
- RelationshipSet.cs
- AdRotatorDesigner.cs
- NameValueCollection.cs
- AnnotationDocumentPaginator.cs
- TypeSemantics.cs
- PageRanges.cs
- SerializableReadOnlyDictionary.cs
- XmlReader.cs
- AnnotationDocumentPaginator.cs
- StyleCollectionEditor.cs
- ParserContext.cs
- ResourceSetExpression.cs
- SqlDependencyListener.cs
- StrokeCollection.cs
- COM2ComponentEditor.cs
- RegexNode.cs
- MediaContextNotificationWindow.cs
- KnownBoxes.cs
- SystemWebSectionGroup.cs
- cache.cs
- XNodeNavigator.cs
- Point4DValueSerializer.cs
- DefaultTraceListener.cs
- MissingManifestResourceException.cs
- HtmlGenericControl.cs
- PropertyChangedEventManager.cs
- FixedTextView.cs
- BufferedOutputStream.cs
- TypeSystemHelpers.cs
- ReverseInheritProperty.cs
- QfeChecker.cs
- InitializerFacet.cs
- FontInfo.cs
- TcpTransportElement.cs
- HttpApplicationStateBase.cs
- GroupByExpressionRewriter.cs
- OLEDB_Util.cs
- MessageAction.cs
- HTMLTextWriter.cs
- _Events.cs
- EventInfo.cs
- OdbcDataAdapter.cs
- MetabaseServerConfig.cs
- XmlWhitespace.cs
- SimpleHandlerFactory.cs
- TagMapInfo.cs
- SQLBoolean.cs
- ParseNumbers.cs
- CreateUserWizardStep.cs
- GenericTypeParameterBuilder.cs
- EmptyReadOnlyDictionaryInternal.cs
- DataControlExtensions.cs
- ArithmeticLiteral.cs