Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / RelationshipFixer.cs / 1305376 / 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 where TTargetEntity : class { // 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 where TTargetEntity : class { // 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
- TemplateLookupAction.cs
- HelpProvider.cs
- ListItemDetailViewAttribute.cs
- IList.cs
- OperationInfoBase.cs
- TextTreeTextNode.cs
- XmlHierarchicalDataSourceView.cs
- PeerTransportBindingElement.cs
- XPathExpr.cs
- DifferencingCollection.cs
- SharedPersonalizationStateInfo.cs
- Configuration.cs
- SafeSystemMetrics.cs
- PathFigure.cs
- AutomationEventArgs.cs
- SrgsNameValueTag.cs
- ParenthesizePropertyNameAttribute.cs
- LinkArea.cs
- PnrpPermission.cs
- NetworkAddressChange.cs
- InfoCardSchemas.cs
- HandleTable.cs
- SqlProvider.cs
- ProjectedSlot.cs
- Grammar.cs
- OdbcCommandBuilder.cs
- SerializationInfo.cs
- TagMapCollection.cs
- NavigatorInvalidBodyAccessException.cs
- ConstantSlot.cs
- OdbcUtils.cs
- Inflater.cs
- ResourcesBuildProvider.cs
- CodeParameterDeclarationExpression.cs
- WorkflowMarkupSerializerMapping.cs
- ZeroOpNode.cs
- SelectionListComponentEditor.cs
- SystemInfo.cs
- DbConnectionHelper.cs
- BinaryMessageEncoder.cs
- FontStyleConverter.cs
- GenericIdentity.cs
- PolicyUtility.cs
- StringResourceManager.cs
- COM2ComponentEditor.cs
- ConsoleKeyInfo.cs
- XamlTypeWithExplicitNamespace.cs
- FunctionMappingTranslator.cs
- SqlUnionizer.cs
- AsymmetricAlgorithm.cs
- TextRangeEditTables.cs
- PtsHost.cs
- Size3DValueSerializer.cs
- DocumentGrid.cs
- CatalogZoneDesigner.cs
- FormViewDeleteEventArgs.cs
- EventMappingSettings.cs
- SafeProcessHandle.cs
- XamlGridLengthSerializer.cs
- RadioButtonStandardAdapter.cs
- AssociationTypeEmitter.cs
- XmlIlVisitor.cs
- DataSourceView.cs
- LinkDescriptor.cs
- NullEntityWrapper.cs
- FilteredDataSetHelper.cs
- QilPatternVisitor.cs
- SimpleBitVector32.cs
- MaskInputRejectedEventArgs.cs
- XomlSerializationHelpers.cs
- ListViewItemEventArgs.cs
- Version.cs
- Animatable.cs
- PrimitiveSchema.cs
- WebPartConnectionsCancelEventArgs.cs
- BinaryFormatterWriter.cs
- URIFormatException.cs
- ObjectKeyFrameCollection.cs
- LineGeometry.cs
- WebResponse.cs
- GridViewColumnCollection.cs
- SqlColumnizer.cs
- RelationshipSet.cs
- DBCommand.cs
- ReliableInputConnection.cs
- ManipulationDelta.cs
- SByteStorage.cs
- InputElement.cs
- ApplyImportsAction.cs
- HandlerElementCollection.cs
- AsynchronousChannelMergeEnumerator.cs
- TextModifier.cs
- FacetEnabledSchemaElement.cs
- XmlEnumAttribute.cs
- StylusCaptureWithinProperty.cs
- SafeCertificateStore.cs
- Component.cs
- PixelShader.cs
- Tablet.cs
- ZipFileInfoCollection.cs