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
- ProtocolElement.cs
- ToolStripDesignerAvailabilityAttribute.cs
- LogAppendAsyncResult.cs
- RegisteredHiddenField.cs
- BitmapEffectGeneralTransform.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- DesignerTransaction.cs
- StrokeNodeOperations.cs
- ReferenceSchema.cs
- AttributeExtensions.cs
- XmlAttributeAttribute.cs
- FtpRequestCacheValidator.cs
- DataObject.cs
- DiscoveryMessageProperty.cs
- Lazy.cs
- TableLayout.cs
- ClockGroup.cs
- NamespaceInfo.cs
- CatalogPartCollection.cs
- MemoryPressure.cs
- Pair.cs
- FontDriver.cs
- FirstQueryOperator.cs
- ComplexBindingPropertiesAttribute.cs
- EntitySqlQueryCacheKey.cs
- ScopedKnownTypes.cs
- ScrollBar.cs
- MultipartContentParser.cs
- RightsController.cs
- CodeTypeReference.cs
- DateRangeEvent.cs
- iisPickupDirectory.cs
- ToolTipService.cs
- WebPartAddingEventArgs.cs
- XamlPoint3DCollectionSerializer.cs
- InternalConfigEventArgs.cs
- ConfigurationFileMap.cs
- NetPeerTcpBinding.cs
- AnnotationComponentManager.cs
- PolicyException.cs
- BamlResourceContent.cs
- InfoCardTrace.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- PcmConverter.cs
- TiffBitmapDecoder.cs
- MessageContractMemberAttribute.cs
- WebColorConverter.cs
- WorkflowTimerService.cs
- UIAgentAsyncBeginRequest.cs
- MatrixTransform.cs
- SortedSet.cs
- PointAnimation.cs
- DrawListViewSubItemEventArgs.cs
- sqlstateclientmanager.cs
- Accessors.cs
- HuffModule.cs
- JsonFormatGeneratorStatics.cs
- MemoryStream.cs
- UnsafeMethods.cs
- PropertyManager.cs
- DataGridViewCellLinkedList.cs
- TemplateControlParser.cs
- SimpleMailWebEventProvider.cs
- GradientBrush.cs
- SocketConnection.cs
- AuthorizationBehavior.cs
- QuaternionIndependentAnimationStorage.cs
- CounterCreationData.cs
- GeometryCollection.cs
- Accessors.cs
- XmlnsCompatibleWithAttribute.cs
- TextElement.cs
- __FastResourceComparer.cs
- DeadLetterQueue.cs
- EventInfo.cs
- PointConverter.cs
- HostingEnvironment.cs
- EdmEntityTypeAttribute.cs
- RuleSettings.cs
- SchemaImporterExtension.cs
- RectangleGeometry.cs
- ConfigurationLocation.cs
- ConnectionInterfaceCollection.cs
- ConfigXmlAttribute.cs
- FormsAuthenticationEventArgs.cs
- ConfigXmlAttribute.cs
- Method.cs
- DataControlField.cs
- WebPartTransformer.cs
- HwndAppCommandInputProvider.cs
- CharacterString.cs
- ObjectDataSourceFilteringEventArgs.cs
- DocumentOrderComparer.cs
- FollowerQueueCreator.cs
- FieldDescriptor.cs
- PageContentCollection.cs
- LicFileLicenseProvider.cs
- ClickablePoint.cs
- COSERVERINFO.cs
- JsonSerializer.cs