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
- FunctionNode.cs
- KnowledgeBase.cs
- DataProviderNameConverter.cs
- DataGridViewRowHeaderCell.cs
- Point4D.cs
- Win32MouseDevice.cs
- SqlMetaData.cs
- Control.cs
- AutomationPatternInfo.cs
- Avt.cs
- BooleanConverter.cs
- _NegotiateClient.cs
- MergeFailedEvent.cs
- RawAppCommandInputReport.cs
- MruCache.cs
- ObjectItemCachedAssemblyLoader.cs
- CodeTypeDeclarationCollection.cs
- RecognizerStateChangedEventArgs.cs
- Int32RectValueSerializer.cs
- FormViewPageEventArgs.cs
- HandlerFactoryCache.cs
- ValueSerializerAttribute.cs
- httpserverutility.cs
- WSTrust.cs
- Control.cs
- CodeSnippetStatement.cs
- dataobject.cs
- SecurityHelper.cs
- MultiSelectRootGridEntry.cs
- CheckedListBox.cs
- WebPartEditorCancelVerb.cs
- ExclusiveHandleList.cs
- MetadataSerializer.cs
- ListViewSortEventArgs.cs
- WebBrowserNavigatedEventHandler.cs
- HMAC.cs
- FontUnitConverter.cs
- CheckedListBox.cs
- RepeaterItemCollection.cs
- Vector3DCollectionConverter.cs
- XsltOutput.cs
- CompilerParameters.cs
- MouseOverProperty.cs
- HttpResponse.cs
- DateTimeUtil.cs
- ComAdminWrapper.cs
- ValidationErrorCollection.cs
- SafeSystemMetrics.cs
- METAHEADER.cs
- dbdatarecord.cs
- QueryParameter.cs
- GacUtil.cs
- EmptyControlCollection.cs
- DbConnectionStringCommon.cs
- EventEntry.cs
- CodeObjectCreateExpression.cs
- CollaborationHelperFunctions.cs
- OAVariantLib.cs
- DrawingState.cs
- XDRSchema.cs
- Psha1DerivedKeyGenerator.cs
- DataSetMappper.cs
- TextParaLineResult.cs
- XmlAnyElementAttribute.cs
- BuildResultCache.cs
- RegistryExceptionHelper.cs
- PointLight.cs
- CircleHotSpot.cs
- TreeNode.cs
- UpdatePanelControlTrigger.cs
- TripleDESCryptoServiceProvider.cs
- XmlEncodedRawTextWriter.cs
- ReaderContextStackData.cs
- CompoundFileStorageReference.cs
- ProtectedProviderSettings.cs
- SqlAggregateChecker.cs
- InternalRelationshipCollection.cs
- ByteArrayHelperWithString.cs
- Label.cs
- GenerateScriptTypeAttribute.cs
- OracleCommandBuilder.cs
- Help.cs
- Frame.cs
- Thread.cs
- ConnectionManagementElement.cs
- SliderAutomationPeer.cs
- WindowHelperService.cs
- DataGridViewColumnHeaderCell.cs
- TablePattern.cs
- GestureRecognizer.cs
- Graph.cs
- CodeAttributeDeclarationCollection.cs
- ResourceDictionaryCollection.cs
- ToolboxService.cs
- MatrixTransform.cs
- XmlSerializerObjectSerializer.cs
- recordstatescratchpad.cs
- AsyncOperation.cs
- FieldAccessException.cs
- _SSPIWrapper.cs