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
- ResourceDictionaryCollection.cs
- OracleRowUpdatedEventArgs.cs
- CounterCreationDataCollection.cs
- StyleTypedPropertyAttribute.cs
- DoubleKeyFrameCollection.cs
- DropTarget.cs
- SplashScreenNativeMethods.cs
- WinFormsSecurity.cs
- CheckBoxList.cs
- TypeConverter.cs
- ProjectionPlanCompiler.cs
- WebException.cs
- MsmqIntegrationProcessProtocolHandler.cs
- PolicyException.cs
- ReadOnlyCollection.cs
- BitmapDecoder.cs
- IgnoreFileBuildProvider.cs
- ClientFormsIdentity.cs
- EventArgs.cs
- ContextStack.cs
- NamedObject.cs
- TextBoxAutoCompleteSourceConverter.cs
- XmlExtensionFunction.cs
- PropertyInfoSet.cs
- GreenMethods.cs
- XMLSchema.cs
- PrincipalPermission.cs
- SqlResolver.cs
- DataGridViewRowStateChangedEventArgs.cs
- PolyBezierSegment.cs
- XsltException.cs
- Bezier.cs
- SamlSecurityTokenAuthenticator.cs
- IdentityReference.cs
- JoinElimination.cs
- FlowPosition.cs
- CodeTypeParameterCollection.cs
- SignerInfo.cs
- XmlHelper.cs
- ThreadStartException.cs
- RemoveFromCollection.cs
- RelativeSource.cs
- CodeBlockBuilder.cs
- ISO2022Encoding.cs
- HttpHeaderCollection.cs
- InProcStateClientManager.cs
- DynamicActivity.cs
- TextModifier.cs
- AssemblyAttributes.cs
- ComponentResourceKeyConverter.cs
- PageAdapter.cs
- AspNetHostingPermission.cs
- PermissionAttributes.cs
- WindowsScroll.cs
- TimeSpanStorage.cs
- ToolboxItemCollection.cs
- DocumentCollection.cs
- WebPartExportVerb.cs
- DesignerActionUI.cs
- RemotingAttributes.cs
- UnsafeCollabNativeMethods.cs
- StorageScalarPropertyMapping.cs
- ViewGenerator.cs
- IndexedString.cs
- CaseStatementProjectedSlot.cs
- BooleanConverter.cs
- ThicknessConverter.cs
- ToolStripKeyboardHandlingService.cs
- DataGridViewRowPrePaintEventArgs.cs
- TdsParserStaticMethods.cs
- KeyGestureValueSerializer.cs
- VarRemapper.cs
- Repeater.cs
- XmlReflectionImporter.cs
- MsdtcClusterUtils.cs
- DataRecord.cs
- ManagementOperationWatcher.cs
- TextServicesHost.cs
- MatrixConverter.cs
- Regex.cs
- ToolboxItemCollection.cs
- DeferredSelectedIndexReference.cs
- ResourceIDHelper.cs
- BitmapMetadata.cs
- UInt32Storage.cs
- ServiceObjectContainer.cs
- PropertyFilterAttribute.cs
- ReadOnlyDataSourceView.cs
- PrimitiveXmlSerializers.cs
- HMACSHA1.cs
- DataRowComparer.cs
- XmlIlTypeHelper.cs
- PopOutPanel.cs
- HtmlPhoneCallAdapter.cs
- MDIControlStrip.cs
- BrowsableAttribute.cs
- OptimizedTemplateContentHelper.cs
- InkCanvasSelection.cs
- RIPEMD160Managed.cs
- FontDifferentiator.cs