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
- SqlCacheDependencySection.cs
- XamlGridLengthSerializer.cs
- RadioButtonStandardAdapter.cs
- AnchoredBlock.cs
- SlipBehavior.cs
- AutomationProperties.cs
- DataGridRowsPresenter.cs
- EmptyWithCancelationCheckWorkItem.cs
- Solver.cs
- Itemizer.cs
- DelegateArgument.cs
- SizeValueSerializer.cs
- FontConverter.cs
- SrgsElementFactory.cs
- MatrixKeyFrameCollection.cs
- WinEventHandler.cs
- NullRuntimeConfig.cs
- Enum.cs
- PermissionToken.cs
- ParenExpr.cs
- DtdParser.cs
- PrtCap_Base.cs
- Region.cs
- DoubleUtil.cs
- WebRequestModulesSection.cs
- OleDbErrorCollection.cs
- ListViewTableCell.cs
- DBCSCodePageEncoding.cs
- DesignBindingValueUIHandler.cs
- MethodRental.cs
- Screen.cs
- LocalBuilder.cs
- XmlDownloadManager.cs
- HtmlEmptyTagControlBuilder.cs
- IgnoreFileBuildProvider.cs
- CleanUpVirtualizedItemEventArgs.cs
- WinFormsUtils.cs
- DataGridCellClipboardEventArgs.cs
- ExpressionEditorSheet.cs
- InternalResources.cs
- ProviderUtil.cs
- PropertyRef.cs
- XmlSchemaGroup.cs
- CodeMethodInvokeExpression.cs
- SslStream.cs
- HttpPostProtocolReflector.cs
- RuleRef.cs
- DataGridViewButtonColumn.cs
- PartitionerQueryOperator.cs
- ReachVisualSerializer.cs
- HttpContext.cs
- NTAccount.cs
- ListViewDataItem.cs
- AdornerHitTestResult.cs
- DBSchemaRow.cs
- FixedSOMTableRow.cs
- XmlSerializerAssemblyAttribute.cs
- PersonalizationEntry.cs
- SymmetricKeyWrap.cs
- DataAdapter.cs
- ReferencedAssembly.cs
- ImageIndexConverter.cs
- MenuCommands.cs
- UnmanagedMarshal.cs
- BamlRecords.cs
- FastEncoderWindow.cs
- InvalidOleVariantTypeException.cs
- StrongTypingException.cs
- CodeSnippetCompileUnit.cs
- UseAttributeSetsAction.cs
- BrowsableAttribute.cs
- HtmlMeta.cs
- InheritanceRules.cs
- EntityDataSourceWrapperCollection.cs
- SessionStateSection.cs
- Completion.cs
- CompressStream.cs
- PublisherIdentityPermission.cs
- BitmapCodecInfoInternal.cs
- DateRangeEvent.cs
- JsonSerializer.cs
- ToolStripContainerDesigner.cs
- Menu.cs
- DataTemplateKey.cs
- X509UI.cs
- Nodes.cs
- Lasso.cs
- DSASignatureFormatter.cs
- FilterableData.cs
- XmlnsDictionary.cs
- Directory.cs
- AnimationClockResource.cs
- PreparingEnlistment.cs
- LiteralSubsegment.cs
- AnnotationComponentChooser.cs
- StaticSiteMapProvider.cs
- ThreadExceptionDialog.cs
- ElementsClipboardData.cs
- MethodToken.cs
- AppearanceEditorPart.cs