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
- CacheOutputQuery.cs
- ErrorsHelper.cs
- RevocationPoint.cs
- DocumentSequence.cs
- ToolboxItem.cs
- XmlSchemaChoice.cs
- NameValueCollection.cs
- OleDbEnumerator.cs
- DecoderReplacementFallback.cs
- DSASignatureDeformatter.cs
- GridViewCommandEventArgs.cs
- SiteMapDataSource.cs
- SqlDeflator.cs
- XmlSerializableWriter.cs
- SystemIPAddressInformation.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- CombinedHttpChannel.cs
- HybridWebProxyFinder.cs
- UnsafeNativeMethodsPenimc.cs
- PrePrepareMethodAttribute.cs
- DiffuseMaterial.cs
- BoolExpr.cs
- SchemaImporterExtensionsSection.cs
- DataKeyCollection.cs
- SoapIgnoreAttribute.cs
- HttpRequestCacheValidator.cs
- UnicodeEncoding.cs
- InputProviderSite.cs
- OrderablePartitioner.cs
- TypeForwardedFromAttribute.cs
- XmlUtilWriter.cs
- securestring.cs
- ConfigXmlAttribute.cs
- FeatureManager.cs
- ProviderException.cs
- Graph.cs
- ClosureBinding.cs
- CreateUserErrorEventArgs.cs
- GridErrorDlg.cs
- CodeCatchClauseCollection.cs
- JournalEntryStack.cs
- FormView.cs
- NamespaceQuery.cs
- WindowsFormsSynchronizationContext.cs
- ListItem.cs
- MetadataCache.cs
- CachedBitmap.cs
- MD5Cng.cs
- BinaryMethodMessage.cs
- TypeExtension.cs
- DbDataRecord.cs
- DynamicRendererThreadManager.cs
- ParallelTimeline.cs
- AssociationSetEnd.cs
- HostSecurityManager.cs
- InheritanceContextHelper.cs
- GlyphingCache.cs
- NativeWindow.cs
- HtmlEmptyTagControlBuilder.cs
- XsltLibrary.cs
- BitmapData.cs
- WebFormDesignerActionService.cs
- DataGridTable.cs
- NavigationPropertyEmitter.cs
- ValueOfAction.cs
- CalculatedColumn.cs
- BooleanAnimationUsingKeyFrames.cs
- Pen.cs
- ListViewDeleteEventArgs.cs
- UpdatePanel.cs
- CellNormalizer.cs
- UpdateEventArgs.cs
- RootAction.cs
- LambdaCompiler.ControlFlow.cs
- coordinator.cs
- FixedPageAutomationPeer.cs
- ProcessHost.cs
- UserControl.cs
- XmlSchemaGroup.cs
- TypeToStringValueConverter.cs
- DesignerCategoryAttribute.cs
- QilTypeChecker.cs
- MailWriter.cs
- HttpPostedFile.cs
- SafeNativeMethods.cs
- GlyphRun.cs
- AppDomainShutdownMonitor.cs
- oledbconnectionstring.cs
- CollectionType.cs
- ConfigXmlElement.cs
- HierarchicalDataBoundControl.cs
- WindowsListViewGroupHelper.cs
- MatrixUtil.cs
- CodeAssignStatement.cs
- BasicViewGenerator.cs
- CompilerResults.cs
- Positioning.cs
- AutomationTextAttribute.cs
- CheckPair.cs
- TaskCanceledException.cs