Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / RelationshipFixer.cs / 1 / 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
- StandardCommands.cs
- RawStylusInputReport.cs
- XPathMultyIterator.cs
- RepeatButton.cs
- SmiTypedGetterSetter.cs
- keycontainerpermission.cs
- TemplateControlBuildProvider.cs
- Thumb.cs
- ElementMarkupObject.cs
- BitSet.cs
- WebConfigurationFileMap.cs
- TypeConverterHelper.cs
- TemplateControl.cs
- BuildDependencySet.cs
- ToolStripLabel.cs
- AuthorizationRule.cs
- GetPolicyDetailsRequest.cs
- PaintEvent.cs
- Win32Exception.cs
- FunctionCommandText.cs
- ImpersonationContext.cs
- PropertyItemInternal.cs
- TabItem.cs
- ProjectionPathSegment.cs
- Codec.cs
- SecureEnvironment.cs
- OracleColumn.cs
- ToolStripDropDownItem.cs
- ButtonField.cs
- HyperLinkColumn.cs
- ClientRolePrincipal.cs
- NoPersistScope.cs
- PropertyEmitterBase.cs
- CodeObjectCreateExpression.cs
- PerformanceCounterPermissionEntryCollection.cs
- System.Data.OracleClient_BID.cs
- WebServiceMethodData.cs
- RelOps.cs
- SmtpTransport.cs
- ParserExtension.cs
- ItemCollectionEditor.cs
- ImageDrawing.cs
- TextPointerBase.cs
- Repeater.cs
- ColorPalette.cs
- ListControlStringCollectionEditor.cs
- _SpnDictionary.cs
- BamlTreeUpdater.cs
- ModuleBuilder.cs
- FrugalMap.cs
- SID.cs
- SystemIcons.cs
- AlternateViewCollection.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- QilXmlReader.cs
- MappingItemCollection.cs
- XmlCountingReader.cs
- ModelMemberCollection.cs
- List.cs
- ChtmlTextWriter.cs
- CorrelationTokenTypeConvertor.cs
- XmlQueryContext.cs
- FormViewInsertEventArgs.cs
- RuntimeIdentifierPropertyAttribute.cs
- PriorityBindingExpression.cs
- DefaultEventAttribute.cs
- PageRanges.cs
- HMACRIPEMD160.cs
- ScriptControlDescriptor.cs
- DefaultTextStoreTextComposition.cs
- WrapPanel.cs
- DataGridRowEventArgs.cs
- XmlBaseReader.cs
- KeyValuePair.cs
- WindowsGraphics.cs
- PartitionerQueryOperator.cs
- CustomWebEventKey.cs
- ArcSegment.cs
- SqlMethodTransformer.cs
- ResourceDictionary.cs
- XmlTextWriter.cs
- Touch.cs
- XamlFilter.cs
- __FastResourceComparer.cs
- TypeDelegator.cs
- webeventbuffer.cs
- ListBoxDesigner.cs
- VariantWrapper.cs
- EditorReuseAttribute.cs
- IDReferencePropertyAttribute.cs
- CompiledXpathExpr.cs
- WmlImageAdapter.cs
- webproxy.cs
- XmlSchemaComplexContentRestriction.cs
- UpDownBaseDesigner.cs
- LiteralControl.cs
- PartialTrustHelpers.cs
- CodeNamespace.cs
- SubpageParagraph.cs
- CompositeCollectionView.cs