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
- AccessKeyManager.cs
- ReaderWriterLockWrapper.cs
- NaturalLanguageHyphenator.cs
- DocumentGrid.cs
- ProcessRequestArgs.cs
- MbpInfo.cs
- Request.cs
- TemplateControl.cs
- PropertyConverter.cs
- CodeCastExpression.cs
- EditorZone.cs
- WebConfigManager.cs
- DrawingContextWalker.cs
- XmlUrlEditor.cs
- FaultDescription.cs
- ColorMap.cs
- SynchronizationContext.cs
- TargetConverter.cs
- WaitHandleCannotBeOpenedException.cs
- HttpContextServiceHost.cs
- BaseDataBoundControlDesigner.cs
- XamlFigureLengthSerializer.cs
- KeyValuePair.cs
- HtmlTextArea.cs
- AffineTransform3D.cs
- Boolean.cs
- SQLMoney.cs
- TableCell.cs
- ContainerControl.cs
- FamilyMapCollection.cs
- ProxyAttribute.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- XmlResolver.cs
- LinkTarget.cs
- Util.cs
- ForwardPositionQuery.cs
- MemoryMappedView.cs
- ApplicationId.cs
- WeakReferenceKey.cs
- OracleColumn.cs
- sitestring.cs
- mediapermission.cs
- PerfCounters.cs
- DiscreteKeyFrames.cs
- XmlObjectSerializer.cs
- PtsHost.cs
- ModelFactory.cs
- NetworkStream.cs
- UnsafeNativeMethods.cs
- BitmapMetadata.cs
- DBSqlParserTable.cs
- StateItem.cs
- SelectionBorderGlyph.cs
- RegexParser.cs
- ScriptControlDescriptor.cs
- ToolBarButtonClickEvent.cs
- TemplateControlBuildProvider.cs
- XmlSerializerFactory.cs
- ThreadExceptionEvent.cs
- ErasingStroke.cs
- BooleanStorage.cs
- WebPartConnectionCollection.cs
- DispatcherBuilder.cs
- LocationReference.cs
- AnnotationStore.cs
- Odbc32.cs
- ToolStripGripRenderEventArgs.cs
- XPathDocument.cs
- EntitySqlQueryCacheKey.cs
- ConfigurationElementCollection.cs
- ToolStripTextBox.cs
- BamlReader.cs
- SkewTransform.cs
- CacheChildrenQuery.cs
- Transform.cs
- DLinqTableProvider.cs
- LayoutDump.cs
- CacheAxisQuery.cs
- ProcessModule.cs
- SafeFreeMibTable.cs
- MexNamedPipeBindingElement.cs
- Color.cs
- EntityDataSourceDesignerHelper.cs
- loginstatus.cs
- SessionEndedEventArgs.cs
- UriPrefixTable.cs
- ContextStack.cs
- NonClientArea.cs
- HyperLinkStyle.cs
- MessageBox.cs
- ByteAnimationUsingKeyFrames.cs
- NotifyInputEventArgs.cs
- ButtonChrome.cs
- SiteMapDataSource.cs
- EntityClientCacheEntry.cs
- ImageAutomationPeer.cs
- XPathScanner.cs
- PathFigure.cs
- MetabaseReader.cs
- SqlBulkCopy.cs