Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / RelationshipFixer.cs / 1305376 / 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 where TTargetEntity : class { // 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 where TTargetEntity : class { // 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
- DataGridViewHitTestInfo.cs
- SecurityUtils.cs
- ReadOnlyKeyedCollection.cs
- XmlNodeChangedEventArgs.cs
- SchemaNamespaceManager.cs
- Transform.cs
- EditorZone.cs
- StoreItemCollection.Loader.cs
- TableLayoutColumnStyleCollection.cs
- ClientCredentialsElement.cs
- IgnoreFileBuildProvider.cs
- DesignerForm.cs
- DelimitedListTraceListener.cs
- StorageEntityContainerMapping.cs
- HttpErrorTraceRecord.cs
- ReadOnlyDataSource.cs
- BoundField.cs
- RegexCharClass.cs
- BStrWrapper.cs
- HandleRef.cs
- SafeHandles.cs
- ExtensionWindow.cs
- CustomAttributeBuilder.cs
- Socket.cs
- EndpointNameMessageFilter.cs
- Profiler.cs
- RowSpanVector.cs
- sqlstateclientmanager.cs
- NamespaceDecl.cs
- SqlNamer.cs
- LockingPersistenceProvider.cs
- DependencyPropertyDescriptor.cs
- ConfigurationValues.cs
- Rotation3D.cs
- XmlSchemaValidationException.cs
- ChannelServices.cs
- ToolStripContainer.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- FrameworkElement.cs
- SQLInt16.cs
- OpCopier.cs
- UnsettableComboBox.cs
- ExternalDataExchangeService.cs
- ChangePassword.cs
- Style.cs
- UIElementParaClient.cs
- ArgumentsParser.cs
- SortDescription.cs
- OdbcParameterCollection.cs
- HttpListenerRequest.cs
- ConfigurationFileMap.cs
- EditorZoneBase.cs
- DesignerMetadata.cs
- StaticExtension.cs
- Vector.cs
- DataRecordInternal.cs
- TextTreeDeleteContentUndoUnit.cs
- ParseChildrenAsPropertiesAttribute.cs
- UpdateException.cs
- QualifiedCellIdBoolean.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- SourceItem.cs
- XmlBindingWorker.cs
- HttpPostedFile.cs
- RegexWorker.cs
- BatchParser.cs
- FileStream.cs
- CommandPlan.cs
- Focus.cs
- DataSourceXmlSerializationAttribute.cs
- QuaternionConverter.cs
- ModelTreeEnumerator.cs
- AutoScrollExpandMessageFilter.cs
- ItemCheckEvent.cs
- SqlReorderer.cs
- MarginCollapsingState.cs
- RequestQueue.cs
- DataGridViewDesigner.cs
- WebConfigurationFileMap.cs
- LocatorPartList.cs
- ColorConverter.cs
- StringUtil.cs
- SqlDataSourceCommandEventArgs.cs
- QilLiteral.cs
- X509CertificateInitiatorClientCredential.cs
- securitycriticaldataformultiplegetandset.cs
- codemethodreferenceexpression.cs
- DBSqlParserTable.cs
- UnionExpr.cs
- SortQuery.cs
- UnmanagedMarshal.cs
- Compensation.cs
- ScaleTransform3D.cs
- IndexOutOfRangeException.cs
- CallSiteOps.cs
- RemoteWebConfigurationHostStream.cs
- XmlMessageFormatter.cs
- EventLogPermissionHolder.cs
- ResourceBinder.cs
- Sequence.cs