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
- LicFileLicenseProvider.cs
- MethodMessage.cs
- BaseParagraph.cs
- XmlSiteMapProvider.cs
- commandenforcer.cs
- DESCryptoServiceProvider.cs
- ListViewInsertEventArgs.cs
- ToolStripDropDownDesigner.cs
- AssemblyCache.cs
- DirectoryInfo.cs
- HelpProvider.cs
- CapabilitiesRule.cs
- ContainerActivationHelper.cs
- OleDbCommand.cs
- MemberHolder.cs
- CustomTypeDescriptor.cs
- DataRelationCollection.cs
- XmlReturnReader.cs
- PopOutPanel.cs
- GridViewSortEventArgs.cs
- DataGridViewRowStateChangedEventArgs.cs
- arclist.cs
- BaseTemplatedMobileComponentEditor.cs
- WindowsToolbarItemAsMenuItem.cs
- WeakHashtable.cs
- OutOfMemoryException.cs
- CategoryAttribute.cs
- CompareInfo.cs
- WeakReferenceKey.cs
- TextRangeEditLists.cs
- ScriptDescriptor.cs
- DragSelectionMessageFilter.cs
- PolyLineSegment.cs
- PbrsForward.cs
- ElementProxy.cs
- HMACRIPEMD160.cs
- QilScopedVisitor.cs
- OrderByLifter.cs
- PropertyInformation.cs
- ScopelessEnumAttribute.cs
- ImpersonationContext.cs
- ToolBarButton.cs
- CapabilitiesRule.cs
- TreeChangeInfo.cs
- ConversionContext.cs
- BitmapEffectGroup.cs
- ParallelSeparator.xaml.cs
- BlurEffect.cs
- ZeroOpNode.cs
- DateTimeConverter2.cs
- AutomationPropertyInfo.cs
- CodeExpressionCollection.cs
- EmptyControlCollection.cs
- _ListenerRequestStream.cs
- NumberSubstitution.cs
- CommandTreeTypeHelper.cs
- DirectoryObjectSecurity.cs
- Error.cs
- HttpFileCollection.cs
- IdentitySection.cs
- Compiler.cs
- prompt.cs
- TypeConverterHelper.cs
- DoubleLinkListEnumerator.cs
- MethodToken.cs
- SelectionItemPattern.cs
- NetworkAddressChange.cs
- securestring.cs
- CodeGotoStatement.cs
- TypeElement.cs
- SubMenuStyle.cs
- ExpressionBuilder.cs
- Geometry3D.cs
- TemplateControlCodeDomTreeGenerator.cs
- MethodToken.cs
- StandardOleMarshalObject.cs
- GPStream.cs
- Renderer.cs
- MultiAsyncResult.cs
- __Filters.cs
- PointCollectionValueSerializer.cs
- ByteRangeDownloader.cs
- OutputCacheSettingsSection.cs
- DataGridTextBox.cs
- HyperLink.cs
- SizeChangedEventArgs.cs
- HtmlElement.cs
- StrongNameKeyPair.cs
- CellRelation.cs
- XmlnsDefinitionAttribute.cs
- TableItemStyle.cs
- ControlIdConverter.cs
- AnimatedTypeHelpers.cs
- ToolboxComponentsCreatingEventArgs.cs
- RectangleConverter.cs
- RNGCryptoServiceProvider.cs
- OutputCacheModule.cs
- peersecurityelement.cs
- TdsParserSafeHandles.cs
- UInt16Storage.cs