Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / DataClasses / EdmRelationshipRoleAttribute.cs / 1305376 / EdmRelationshipRoleAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Metadata.Edm; //for RelationshipMultiplicity namespace System.Data.Objects.DataClasses { ////// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] public sealed class EdmRelationshipAttribute : System.Attribute { private readonly string _relationshipNamespaceName; private readonly string _relationshipName; private readonly string _role1Name; private readonly string _role2Name; private readonly RelationshipMultiplicity _role1Multiplicity; private readonly RelationshipMultiplicity _role2Multiplicity; private readonly Type _role1Type; private readonly Type _role2Type; private readonly bool _isForeignKey; ////// Attribute containing the details for a relationship /// This should match the C-Space relationship information, but having it available in this /// attribute allows us access to this information even in O-Space when there is no context. /// There can be multiple attributes of this type in an assembly. /// public EdmRelationshipAttribute(string relationshipNamespaceName, string relationshipName, string role1Name, RelationshipMultiplicity role1Multiplicity, Type role1Type, string role2Name, RelationshipMultiplicity role2Multiplicity, Type role2Type) { _relationshipNamespaceName = relationshipNamespaceName; _relationshipName = relationshipName; _role1Name = role1Name; _role1Multiplicity = role1Multiplicity; _role1Type = role1Type; _role2Name = role2Name; _role2Multiplicity = role2Multiplicity; _role2Type = role2Type; } ////// Attribute containing the details for a relationship /// This should match the C-Space relationship information, but having it available in this /// attribute allows us access to this information even in O-Space when there is no context. /// There can be multiple attributes of this type in an assembly. /// public EdmRelationshipAttribute(string relationshipNamespaceName, string relationshipName, string role1Name, RelationshipMultiplicity role1Multiplicity, Type role1Type, string role2Name, RelationshipMultiplicity role2Multiplicity, Type role2Type, bool isForeignKey) { _relationshipNamespaceName = relationshipNamespaceName; _relationshipName = relationshipName; _role1Name = role1Name; _role1Multiplicity = role1Multiplicity; _role1Type = role1Type; _role2Name = role2Name; _role2Multiplicity = role2Multiplicity; _role2Type = role2Type; _isForeignKey = isForeignKey; } ////// The name of the namespace that the relationship is in /// public string RelationshipNamespaceName { get { return _relationshipNamespaceName; } } ////// The name of a relationship /// public string RelationshipName { get { return _relationshipName; } } ////// The name of the role /// public string Role1Name { get { return _role1Name; } } ////// The multiplicity of the the RoleName in RelationshipName /// public RelationshipMultiplicity Role1Multiplicity { get { return _role1Multiplicity; } } ////// The CLR type for the role associated with this relationship /// public Type Role1Type { get { return _role1Type; } } ////// The name of the role /// public string Role2Name { get { return _role2Name; } } ////// The multiplicity of the the RoleName in RelationshipName /// public RelationshipMultiplicity Role2Multiplicity { get { return _role2Multiplicity; } } ////// The CLR type for the role associated with this relationship /// public Type Role2Type { get { return _role2Type; } } ////// Indicates whether this is a common-value (or FK-based) relationship. /// public bool IsForeignKey { get { return _isForeignKey; } } } } // 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; //for RelationshipMultiplicity namespace System.Data.Objects.DataClasses { ////// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] public sealed class EdmRelationshipAttribute : System.Attribute { private readonly string _relationshipNamespaceName; private readonly string _relationshipName; private readonly string _role1Name; private readonly string _role2Name; private readonly RelationshipMultiplicity _role1Multiplicity; private readonly RelationshipMultiplicity _role2Multiplicity; private readonly Type _role1Type; private readonly Type _role2Type; private readonly bool _isForeignKey; ////// Attribute containing the details for a relationship /// This should match the C-Space relationship information, but having it available in this /// attribute allows us access to this information even in O-Space when there is no context. /// There can be multiple attributes of this type in an assembly. /// public EdmRelationshipAttribute(string relationshipNamespaceName, string relationshipName, string role1Name, RelationshipMultiplicity role1Multiplicity, Type role1Type, string role2Name, RelationshipMultiplicity role2Multiplicity, Type role2Type) { _relationshipNamespaceName = relationshipNamespaceName; _relationshipName = relationshipName; _role1Name = role1Name; _role1Multiplicity = role1Multiplicity; _role1Type = role1Type; _role2Name = role2Name; _role2Multiplicity = role2Multiplicity; _role2Type = role2Type; } ////// Attribute containing the details for a relationship /// This should match the C-Space relationship information, but having it available in this /// attribute allows us access to this information even in O-Space when there is no context. /// There can be multiple attributes of this type in an assembly. /// public EdmRelationshipAttribute(string relationshipNamespaceName, string relationshipName, string role1Name, RelationshipMultiplicity role1Multiplicity, Type role1Type, string role2Name, RelationshipMultiplicity role2Multiplicity, Type role2Type, bool isForeignKey) { _relationshipNamespaceName = relationshipNamespaceName; _relationshipName = relationshipName; _role1Name = role1Name; _role1Multiplicity = role1Multiplicity; _role1Type = role1Type; _role2Name = role2Name; _role2Multiplicity = role2Multiplicity; _role2Type = role2Type; _isForeignKey = isForeignKey; } ////// The name of the namespace that the relationship is in /// public string RelationshipNamespaceName { get { return _relationshipNamespaceName; } } ////// The name of a relationship /// public string RelationshipName { get { return _relationshipName; } } ////// The name of the role /// public string Role1Name { get { return _role1Name; } } ////// The multiplicity of the the RoleName in RelationshipName /// public RelationshipMultiplicity Role1Multiplicity { get { return _role1Multiplicity; } } ////// The CLR type for the role associated with this relationship /// public Type Role1Type { get { return _role1Type; } } ////// The name of the role /// public string Role2Name { get { return _role2Name; } } ////// The multiplicity of the the RoleName in RelationshipName /// public RelationshipMultiplicity Role2Multiplicity { get { return _role2Multiplicity; } } ////// The CLR type for the role associated with this relationship /// public Type Role2Type { get { return _role2Type; } } ////// Indicates whether this is a common-value (or FK-based) relationship. /// public bool IsForeignKey { get { return _isForeignKey; } } } } // 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
- PersonalizationStateInfo.cs
- XmlCollation.cs
- SafeFileMappingHandle.cs
- ListViewItemSelectionChangedEvent.cs
- UriTemplateCompoundPathSegment.cs
- TemplateControlCodeDomTreeGenerator.cs
- FontFamily.cs
- _SslState.cs
- DataGridViewSelectedCellCollection.cs
- activationcontext.cs
- QilExpression.cs
- PromptStyle.cs
- Point4DValueSerializer.cs
- ScrollEventArgs.cs
- SectionXmlInfo.cs
- DbMetaDataCollectionNames.cs
- TypedRowHandler.cs
- UrlMapping.cs
- FixedTextView.cs
- RemotingConfigParser.cs
- DataSourceHelper.cs
- ChangeTracker.cs
- BinaryMethodMessage.cs
- PersonalizationDictionary.cs
- HMACSHA1.cs
- BitmapEffectOutputConnector.cs
- DbResourceAllocator.cs
- SQLSingleStorage.cs
- HwndHostAutomationPeer.cs
- TextSpanModifier.cs
- TextSelectionHelper.cs
- HuffCodec.cs
- xmlsaver.cs
- RuntimeArgumentHandle.cs
- MissingManifestResourceException.cs
- TextSimpleMarkerProperties.cs
- TextStore.cs
- XPathDocumentNavigator.cs
- TrackBarDesigner.cs
- CmsUtils.cs
- Transform3D.cs
- Optimizer.cs
- NativeMethods.cs
- GetKeyedHashRequest.cs
- SoapClientProtocol.cs
- CommandEventArgs.cs
- JsonUriDataContract.cs
- TextBoxAutoCompleteSourceConverter.cs
- DefaultProfileManager.cs
- BaseTemplateCodeDomTreeGenerator.cs
- XmlSchemaComplexContent.cs
- SerializationObjectManager.cs
- InputScopeNameConverter.cs
- ToolStripSplitButton.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- CodeAttributeArgumentCollection.cs
- FloaterBaseParagraph.cs
- XmlHierarchicalEnumerable.cs
- Normalization.cs
- InputGestureCollection.cs
- Matrix3DStack.cs
- GeometryCollection.cs
- EntityRecordInfo.cs
- ITreeGenerator.cs
- ButtonBase.cs
- RowUpdatedEventArgs.cs
- CounterCreationDataCollection.cs
- UniqueIdentifierService.cs
- ProjectionPathBuilder.cs
- RadioButtonFlatAdapter.cs
- DiagnosticTraceSource.cs
- SimpleHandlerBuildProvider.cs
- ProxyWebPart.cs
- ExtendedProtectionPolicyElement.cs
- EntityCollectionChangedParams.cs
- DataGrid.cs
- OletxResourceManager.cs
- ReadOnlyCollectionBase.cs
- AutomationPropertyInfo.cs
- TextElementEditingBehaviorAttribute.cs
- PropertiesTab.cs
- TextElementEditingBehaviorAttribute.cs
- NotSupportedException.cs
- ListManagerBindingsCollection.cs
- XmlName.cs
- DataSourceCache.cs
- ItemsChangedEventArgs.cs
- CacheMemory.cs
- AdCreatedEventArgs.cs
- TreeNodeStyle.cs
- DataControlFieldHeaderCell.cs
- NativeMethods.cs
- TranslateTransform.cs
- DLinqColumnProvider.cs
- Matrix.cs
- Asn1Utilities.cs
- Literal.cs
- GridViewColumnCollectionChangedEventArgs.cs
- EntityDataSourceWizardForm.cs
- ActivityXRefPropertyEditor.cs