Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- RayMeshGeometry3DHitTestResult.cs
- HtmlInputReset.cs
- TextContainerChangeEventArgs.cs
- _PooledStream.cs
- StorageMappingItemLoader.cs
- DataControlReference.cs
- XmlSchemaException.cs
- HebrewCalendar.cs
- HttpListenerException.cs
- WebBrowsableAttribute.cs
- RawStylusInputCustomDataList.cs
- XmlNamespaceMappingCollection.cs
- CredentialCache.cs
- DataContext.cs
- BindingContext.cs
- PersistenceTypeAttribute.cs
- NameTable.cs
- TabControlEvent.cs
- PrintDialog.cs
- TokenDescriptor.cs
- PartialCachingAttribute.cs
- SchemaImporterExtensionsSection.cs
- WebServiceData.cs
- RouteParameter.cs
- DbConnectionPoolGroup.cs
- FormViewRow.cs
- WindowPattern.cs
- XmlSchemaAttributeGroupRef.cs
- TypeKeyValue.cs
- FixedSOMElement.cs
- wgx_sdk_version.cs
- NamedPipeProcessProtocolHandler.cs
- WindowsRebar.cs
- AsyncStreamReader.cs
- AppearanceEditorPart.cs
- TagPrefixInfo.cs
- TrustSection.cs
- XmlNode.cs
- FixedDocumentSequencePaginator.cs
- AuthenticateEventArgs.cs
- DataPagerFieldCollection.cs
- ScriptingWebServicesSectionGroup.cs
- controlskin.cs
- ScriptResourceInfo.cs
- Pen.cs
- FactoryRecord.cs
- FullTextBreakpoint.cs
- MeasurementDCInfo.cs
- GlyphsSerializer.cs
- FastEncoderWindow.cs
- TdsParameterSetter.cs
- PasswordPropertyTextAttribute.cs
- DropSource.cs
- ContentType.cs
- PageVisual.cs
- HtmlAnchor.cs
- SoapDocumentServiceAttribute.cs
- DPCustomTypeDescriptor.cs
- DesignerVerb.cs
- StringWriter.cs
- HMACSHA384.cs
- JsonFormatGeneratorStatics.cs
- NetMsmqBindingCollectionElement.cs
- ISessionStateStore.cs
- TemplateBuilder.cs
- SystemIPv6InterfaceProperties.cs
- WmlPageAdapter.cs
- ReadOnlyDataSourceView.cs
- AppDomainFactory.cs
- SecureEnvironment.cs
- XmlUtf8RawTextWriter.cs
- MarshalDirectiveException.cs
- DynamicValidator.cs
- wgx_exports.cs
- InstanceDataCollectionCollection.cs
- BitStack.cs
- ViewManager.cs
- XmlSchemaAppInfo.cs
- HttpServerChannel.cs
- XmlTextReaderImplHelpers.cs
- AppDomainFactory.cs
- ParenExpr.cs
- PaintEvent.cs
- SolidBrush.cs
- RelationshipDetailsRow.cs
- SerializerProvider.cs
- BindingOperations.cs
- KnowledgeBase.cs
- TopClause.cs
- IndexedDataBuffer.cs
- DeploymentSection.cs
- ViewGenResults.cs
- KeyManager.cs
- Menu.cs
- MatcherBuilder.cs
- TargetControlTypeAttribute.cs
- Table.cs
- TypeConverterAttribute.cs
- BufferedGraphicsContext.cs
- UpdateRecord.cs