Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / AssociationSet.cs / 1 / AssociationSet.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace System.Data.Metadata.Edm { ////// Class for representing an Association set /// public sealed class AssociationSet : RelationshipSet { #region Constructors ////// Initializes a new instance of AssocationSet with the given name and the association type /// /// The name of the Assocation set /// The association type of the entities that this associationship set type contains internal AssociationSet(string name, AssociationType associationType) : base(name, null, null, null, associationType) { } #endregion #region Fields private readonly ReadOnlyMetadataCollection_associationSetEnds = new ReadOnlyMetadataCollection (new MetadataCollection ()); #endregion #region Properties /// /// Returns the association type associated with this association set /// public new AssociationType ElementType { get { return (AssociationType)base.ElementType; } } ////// Returns the ends of the association set /// [MetadataProperty(BuiltInTypeKind.AssociationSetEnd, true)] public ReadOnlyMetadataCollectionAssociationSetEnds { get { return _associationSetEnds; } } /// /// Returns the kind of the type /// public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.AssociationSet; } } #endregion #region Methods ////// Sets this item to be readonly, once this is set, the item will never be writable again. /// internal override void SetReadOnly() { if (!this.IsReadOnly) { base.SetReadOnly(); this.AssociationSetEnds.Source.SetReadOnly(); } } ////// Adds the given end to the collection of ends /// /// internal void AddAssociationSetEnd(AssociationSetEnd associationSetEnd) { this.AssociationSetEnds.Source.Add(associationSetEnd); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace System.Data.Metadata.Edm { ////// Class for representing an Association set /// public sealed class AssociationSet : RelationshipSet { #region Constructors ////// Initializes a new instance of AssocationSet with the given name and the association type /// /// The name of the Assocation set /// The association type of the entities that this associationship set type contains internal AssociationSet(string name, AssociationType associationType) : base(name, null, null, null, associationType) { } #endregion #region Fields private readonly ReadOnlyMetadataCollection_associationSetEnds = new ReadOnlyMetadataCollection (new MetadataCollection ()); #endregion #region Properties /// /// Returns the association type associated with this association set /// public new AssociationType ElementType { get { return (AssociationType)base.ElementType; } } ////// Returns the ends of the association set /// [MetadataProperty(BuiltInTypeKind.AssociationSetEnd, true)] public ReadOnlyMetadataCollectionAssociationSetEnds { get { return _associationSetEnds; } } /// /// Returns the kind of the type /// public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.AssociationSet; } } #endregion #region Methods ////// Sets this item to be readonly, once this is set, the item will never be writable again. /// internal override void SetReadOnly() { if (!this.IsReadOnly) { base.SetReadOnly(); this.AssociationSetEnds.Source.SetReadOnly(); } } ////// Adds the given end to the collection of ends /// /// internal void AddAssociationSetEnd(AssociationSetEnd associationSetEnd) { this.AssociationSetEnds.Source.Add(associationSetEnd); } #endregion } } // 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
- UInt64Converter.cs
- StaticExtension.cs
- EditingCoordinator.cs
- MimeTypeAttribute.cs
- UnescapedXmlDiagnosticData.cs
- DataBinding.cs
- FullTrustAssembliesSection.cs
- DataContractJsonSerializer.cs
- HttpCookie.cs
- TaskHelper.cs
- AdRotator.cs
- HostingEnvironmentSection.cs
- TokenCreationParameter.cs
- ScriptReference.cs
- PathSegmentCollection.cs
- GraphicsPath.cs
- SqlDataRecord.cs
- LogicalChannel.cs
- SqlProviderServices.cs
- FullTextLine.cs
- COM2ComponentEditor.cs
- ProfileSection.cs
- FrameworkElementFactory.cs
- RegexInterpreter.cs
- TextProviderWrapper.cs
- DataGridViewCheckBoxCell.cs
- MarshalByRefObject.cs
- AuthorizationRuleCollection.cs
- PropertyOverridesDialog.cs
- MemberAccessException.cs
- MonikerBuilder.cs
- TextTrailingCharacterEllipsis.cs
- ByteFacetDescriptionElement.cs
- UriWriter.cs
- RenderingEventArgs.cs
- RequiredAttributeAttribute.cs
- WebPartZoneCollection.cs
- SafeCertificateContext.cs
- RoleManagerEventArgs.cs
- ToolboxItemAttribute.cs
- HtmlInputSubmit.cs
- HighlightComponent.cs
- ReadOnlyHierarchicalDataSourceView.cs
- XmlLoader.cs
- TableNameAttribute.cs
- MaterialCollection.cs
- AuthStoreRoleProvider.cs
- ValidationSummary.cs
- IISUnsafeMethods.cs
- ComboBox.cs
- WindowsGraphics.cs
- GetKeyedHashRequest.cs
- DataGridViewCellStyleChangedEventArgs.cs
- BitConverter.cs
- ElapsedEventArgs.cs
- OperatorExpressions.cs
- FixedSOMTextRun.cs
- UTF32Encoding.cs
- RolePrincipal.cs
- RotateTransform3D.cs
- ContextStack.cs
- ChangePassword.cs
- KoreanLunisolarCalendar.cs
- WebZone.cs
- ObjectPropertyMapping.cs
- Attributes.cs
- AspNetSynchronizationContext.cs
- DataGridViewCellCancelEventArgs.cs
- ControlLocalizer.cs
- LockedBorderGlyph.cs
- Margins.cs
- TextBreakpoint.cs
- CurrentChangedEventManager.cs
- MsmqIntegrationInputChannel.cs
- Subset.cs
- WriteLine.cs
- RecipientIdentity.cs
- EncodingInfo.cs
- ThreadExceptionEvent.cs
- MatrixTransform.cs
- DescendantOverDescendantQuery.cs
- HyperLinkColumn.cs
- DataRowExtensions.cs
- HtmlTableCellCollection.cs
- EntityCollection.cs
- EndpointInstanceProvider.cs
- TransactionScope.cs
- precedingquery.cs
- RangeValueProviderWrapper.cs
- PropertyContainer.cs
- EdmEntityTypeAttribute.cs
- TrackingAnnotationCollection.cs
- CheckBoxRenderer.cs
- TypeNameConverter.cs
- TemplateParser.cs
- ControlCollection.cs
- XmlSchemaGroupRef.cs
- Setter.cs
- WebReferenceOptions.cs
- DefaultPrintController.cs