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
- DomainConstraint.cs
- WhitespaceSignificantCollectionAttribute.cs
- DataGridCell.cs
- HttpValueCollection.cs
- OneOfTypeConst.cs
- CookieProtection.cs
- Literal.cs
- RepeatInfo.cs
- UpdateTranslator.cs
- TextTreeUndo.cs
- Queue.cs
- DataBindingList.cs
- SHA384Managed.cs
- TabletCollection.cs
- BinaryFormatterSinks.cs
- SerialStream.cs
- Delay.cs
- SmiRequestExecutor.cs
- SubclassTypeValidatorAttribute.cs
- ProcessModule.cs
- Component.cs
- PropertyBuilder.cs
- ProtocolsConfigurationHandler.cs
- KnownTypesProvider.cs
- ArgumentException.cs
- XmlIlTypeHelper.cs
- OutputCacheProviderCollection.cs
- XmlSchemaElement.cs
- EventsTab.cs
- MDIClient.cs
- SectionInput.cs
- TriggerActionCollection.cs
- ValidationRuleCollection.cs
- ItemChangedEventArgs.cs
- AssertFilter.cs
- SafeCryptoHandles.cs
- MatrixCamera.cs
- XmlSecureResolver.cs
- ReadContentAsBinaryHelper.cs
- PrivacyNoticeElement.cs
- DesignerListAdapter.cs
- ExceptionUtility.cs
- BaseProcessProtocolHandler.cs
- MissingMemberException.cs
- DeviceContext2.cs
- Evaluator.cs
- XmlEventCache.cs
- RTLAwareMessageBox.cs
- BamlResourceContent.cs
- Compiler.cs
- TextPointerBase.cs
- LogWriteRestartAreaAsyncResult.cs
- System.Data.OracleClient_BID.cs
- CodeMemberMethod.cs
- Quad.cs
- CollectionEditorDialog.cs
- DataBoundControl.cs
- DetailsViewRowCollection.cs
- TempFiles.cs
- DataGridRowsPresenter.cs
- GenericTypeParameterBuilder.cs
- PermissionListSet.cs
- MapPathBasedVirtualPathProvider.cs
- DataTableNameHandler.cs
- HelpProvider.cs
- EnumBuilder.cs
- TextBox.cs
- SqlStatistics.cs
- HandleRef.cs
- COM2ColorConverter.cs
- StrongNamePublicKeyBlob.cs
- ImageBrush.cs
- ConnectionStringSettings.cs
- Environment.cs
- MemoryStream.cs
- StringAnimationUsingKeyFrames.cs
- AdPostCacheSubstitution.cs
- XmlSchemaParticle.cs
- util.cs
- HMACSHA1.cs
- ItemCollection.cs
- CreateRefExpr.cs
- MetaTable.cs
- HtmlFormWrapper.cs
- DockAndAnchorLayout.cs
- PathSegmentCollection.cs
- DesignerOptions.cs
- ProviderConnectionPointCollection.cs
- StringSorter.cs
- QueryExpr.cs
- UTF7Encoding.cs
- AsyncOperationContext.cs
- ValidationSummary.cs
- ReflectionPermission.cs
- ArcSegment.cs
- HttpModule.cs
- HttpListenerException.cs
- AppDomainFactory.cs
- LockedHandleGlyph.cs
- ListenerSessionConnectionReader.cs