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
- RowToFieldTransformer.cs
- DecimalStorage.cs
- X509Certificate.cs
- PixelFormat.cs
- EntityObject.cs
- RadioButtonStandardAdapter.cs
- NamespaceTable.cs
- LayoutSettings.cs
- SelectedGridItemChangedEvent.cs
- TokenCreationException.cs
- GroupBox.cs
- UrlMapping.cs
- EventSinkHelperWriter.cs
- InstalledVoice.cs
- HttpClientCertificate.cs
- WebPartConnectionsDisconnectVerb.cs
- SelectedGridItemChangedEvent.cs
- httpserverutility.cs
- SqlDependency.cs
- Single.cs
- ParallelDesigner.cs
- Viewport3DVisual.cs
- DebugHandleTracker.cs
- LogPolicy.cs
- WhileDesigner.xaml.cs
- PenThreadPool.cs
- FileVersion.cs
- storepermission.cs
- ActiveXHelper.cs
- RsaKeyIdentifierClause.cs
- Helpers.cs
- ClientSettingsSection.cs
- HtmlLinkAdapter.cs
- ValidatingPropertiesEventArgs.cs
- StorageMappingFragment.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- SynchronizedInputHelper.cs
- ExceptionWrapper.cs
- FieldBuilder.cs
- ThreadExceptionDialog.cs
- HttpResponseWrapper.cs
- TransactionInterop.cs
- GPRECTF.cs
- AppDomainManager.cs
- XPathMessageFilterElementComparer.cs
- DataGridViewImageCell.cs
- DeflateStream.cs
- Guid.cs
- FunctionImportElement.cs
- EncodingInfo.cs
- FontStretch.cs
- Symbol.cs
- Point3DCollection.cs
- ToolStripDesignerUtils.cs
- PeerResolverSettings.cs
- AutomationElement.cs
- InkCollectionBehavior.cs
- TabletDeviceInfo.cs
- HttpListenerException.cs
- SecurityDescriptor.cs
- InputMethodStateChangeEventArgs.cs
- AppDomainGrammarProxy.cs
- PreviewPageInfo.cs
- DataGridViewTextBoxEditingControl.cs
- AssociationSet.cs
- BaseTreeIterator.cs
- ProviderConnectionPointCollection.cs
- DataSourceCacheDurationConverter.cs
- DrawingContextWalker.cs
- RuleInfoComparer.cs
- TransformedBitmap.cs
- TraceSource.cs
- DrawingServices.cs
- ActivityExecutionFilter.cs
- CommandLibraryHelper.cs
- WmlValidationSummaryAdapter.cs
- BindingsCollection.cs
- SizeAnimationBase.cs
- WebScriptEnablingElement.cs
- ObjectDataSourceDesigner.cs
- PropertyEmitterBase.cs
- BamlCollectionHolder.cs
- RecognizerBase.cs
- SqlVersion.cs
- GlyphRunDrawing.cs
- CompilerErrorCollection.cs
- ManifestBasedResourceGroveler.cs
- WinEventTracker.cs
- _Win32.cs
- OptimisticConcurrencyException.cs
- PrePostDescendentsWalker.cs
- Propagator.JoinPropagator.cs
- HwndProxyElementProvider.cs
- OleStrCAMarshaler.cs
- AsyncContentLoadedEventArgs.cs
- InternalCache.cs
- CorrelationToken.cs
- RequestQueue.cs
- _LocalDataStoreMgr.cs
- DropDownButton.cs