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
- DispatcherExceptionFilterEventArgs.cs
- ObjectItemAssemblyLoader.cs
- Trace.cs
- ParallelTimeline.cs
- StrongNameIdentityPermission.cs
- FileDataSourceCache.cs
- HostExecutionContextManager.cs
- FullTrustAssemblyCollection.cs
- UrlAuthFailureHandler.cs
- Block.cs
- WorkflowServiceBehavior.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- NativeMethods.cs
- EventInfo.cs
- DoubleMinMaxAggregationOperator.cs
- ColorPalette.cs
- HttpHeaderCollection.cs
- Expr.cs
- PrintEvent.cs
- FontSizeConverter.cs
- DataSourceControl.cs
- CompareInfo.cs
- WindowsAuthenticationModule.cs
- OwnerDrawPropertyBag.cs
- ExecutionContext.cs
- StringFreezingAttribute.cs
- PrivilegedConfigurationManager.cs
- EntityDataSourceQueryBuilder.cs
- TraceSection.cs
- DesignTableCollection.cs
- HttpCacheParams.cs
- DataReaderContainer.cs
- TransactionTraceIdentifier.cs
- ArrayWithOffset.cs
- AsyncDataRequest.cs
- ToolboxComponentsCreatingEventArgs.cs
- CollectionExtensions.cs
- BuilderInfo.cs
- XmlSchemaGroupRef.cs
- _CookieModule.cs
- FilterQuery.cs
- CompoundFileStorageReference.cs
- SafeJobHandle.cs
- ObjectQueryProvider.cs
- KeyValuePairs.cs
- ConnectionProviderAttribute.cs
- TreeViewEvent.cs
- PathSegment.cs
- FrameworkElement.cs
- UIElement.cs
- ComplexObject.cs
- TextElementAutomationPeer.cs
- StorageAssociationSetMapping.cs
- SpeechAudioFormatInfo.cs
- TimelineClockCollection.cs
- EventLogPermissionHolder.cs
- PackageRelationshipCollection.cs
- Int32AnimationUsingKeyFrames.cs
- GroupLabel.cs
- BitmapPalettes.cs
- SynchronizedPool.cs
- BitmapEffectGroup.cs
- DocumentSequence.cs
- SelectorAutomationPeer.cs
- SrgsGrammarCompiler.cs
- CompareValidator.cs
- BitmapEffectDrawing.cs
- Compress.cs
- ForwardPositionQuery.cs
- TogglePattern.cs
- ManagementObjectCollection.cs
- FixedSOMContainer.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- InkCanvasSelection.cs
- TransformerTypeCollection.cs
- Accessible.cs
- TextComposition.cs
- ConnectionPointCookie.cs
- ExtenderHelpers.cs
- FastEncoder.cs
- NativeMethods.cs
- TextEndOfSegment.cs
- smtpconnection.cs
- RectAnimationUsingKeyFrames.cs
- DetailsViewDeleteEventArgs.cs
- FixedSOMFixedBlock.cs
- ListItemCollection.cs
- TemplateControlCodeDomTreeGenerator.cs
- PagesChangedEventArgs.cs
- ActivitySurrogate.cs
- RectangleGeometry.cs
- ByteStreamGeometryContext.cs
- CodeParameterDeclarationExpressionCollection.cs
- PermissionSetTriple.cs
- ExpressionEditor.cs
- EventHandlerService.cs
- DbInsertCommandTree.cs
- ContextMenu.cs
- SiteMap.cs