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
- DescendantOverDescendantQuery.cs
- FileSystemInfo.cs
- SmtpSection.cs
- VersionPair.cs
- DelegateTypeInfo.cs
- SemaphoreFullException.cs
- MachineKeySection.cs
- XamlHostingConfiguration.cs
- ContentPosition.cs
- Matrix.cs
- ProcessingInstructionAction.cs
- WebPartCatalogAddVerb.cs
- MeshGeometry3D.cs
- SpeakCompletedEventArgs.cs
- ArrayListCollectionBase.cs
- UnknownBitmapDecoder.cs
- AsymmetricSignatureFormatter.cs
- ColorKeyFrameCollection.cs
- XamlTreeBuilder.cs
- DefaultShape.cs
- NameValueSectionHandler.cs
- ChtmlTextBoxAdapter.cs
- MethodBuilder.cs
- XmlTextAttribute.cs
- ExecutedRoutedEventArgs.cs
- HttpProtocolReflector.cs
- WebPartDisplayModeEventArgs.cs
- NonBatchDirectoryCompiler.cs
- XComponentModel.cs
- OleDbRowUpdatedEvent.cs
- ErrorProvider.cs
- OdbcErrorCollection.cs
- Path.cs
- BufferBuilder.cs
- OleCmdHelper.cs
- UnsafeNativeMethods.cs
- SqlCommandSet.cs
- ResourceAssociationSet.cs
- RawStylusActions.cs
- EnumType.cs
- GeneralTransform.cs
- DrawingCollection.cs
- BitmapData.cs
- ClientEventManager.cs
- ImageMapEventArgs.cs
- ManipulationCompletedEventArgs.cs
- TraceSection.cs
- LayoutUtils.cs
- ReverseInheritProperty.cs
- XmlSchema.cs
- AuthStoreRoleProvider.cs
- PerformanceCounterScope.cs
- InkSerializer.cs
- DesignTable.cs
- Input.cs
- VariantWrapper.cs
- GcSettings.cs
- NetCodeGroup.cs
- ControlParameter.cs
- NativeMethodsOther.cs
- SchemaDeclBase.cs
- DataObjectPastingEventArgs.cs
- ToolboxComponentsCreatedEventArgs.cs
- odbcmetadatacollectionnames.cs
- ProcessHostFactoryHelper.cs
- StringPropertyBuilder.cs
- SystemPens.cs
- SelectionChangedEventArgs.cs
- MetabaseServerConfig.cs
- XmlWriterSettings.cs
- RegexCharClass.cs
- GradientBrush.cs
- WindowsPrincipal.cs
- DelayDesigner.cs
- HtmlFormParameterReader.cs
- Utils.cs
- TrackingMemoryStreamFactory.cs
- StickyNote.cs
- infer.cs
- ColumnClickEvent.cs
- TreeViewImageIndexConverter.cs
- WasAdminWrapper.cs
- DesignTimeDataBinding.cs
- InstanceOwnerQueryResult.cs
- QilTypeChecker.cs
- sortedlist.cs
- LogSwitch.cs
- WCFServiceClientProxyGenerator.cs
- BatchParser.cs
- MetadataCollection.cs
- SQLDouble.cs
- QilPatternFactory.cs
- DeviceOverridableAttribute.cs
- TableLayoutRowStyleCollection.cs
- NavigationProperty.cs
- TypeUnloadedException.cs
- ContentPlaceHolderDesigner.cs
- QuaternionConverter.cs
- Accessible.cs
- QueueProcessor.cs