Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- HWStack.cs
- ColorPalette.cs
- ArglessEventHandlerProxy.cs
- NumericUpDown.cs
- InkSerializer.cs
- XpsS0ValidatingLoader.cs
- IteratorDescriptor.cs
- RuleSetBrowserDialog.cs
- AdornedElementPlaceholder.cs
- AssertSection.cs
- precedingsibling.cs
- ConsumerConnectionPointCollection.cs
- StringExpressionSet.cs
- ServiceDeploymentInfo.cs
- TransactionOptions.cs
- AsymmetricKeyExchangeFormatter.cs
- TreeViewImageKeyConverter.cs
- ConfigXmlWhitespace.cs
- DocobjHost.cs
- SystemDropShadowChrome.cs
- SelectiveScrollingGrid.cs
- TimerElapsedEvenArgs.cs
- SizeConverter.cs
- AttributeCollection.cs
- PopupControlService.cs
- StrokeNode.cs
- SamlAudienceRestrictionCondition.cs
- SystemIPv4InterfaceProperties.cs
- DataStreamFromComStream.cs
- ItemDragEvent.cs
- ObjectComplexPropertyMapping.cs
- XamlSerializationHelper.cs
- BidOverLoads.cs
- XsdDataContractExporter.cs
- DataRowExtensions.cs
- LiteralLink.cs
- PeerSecurityManager.cs
- QilNode.cs
- ComAwareEventInfo.cs
- XamlPathDataSerializer.cs
- ReferentialConstraint.cs
- TextBoxAutoCompleteSourceConverter.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- RtfControlWordInfo.cs
- JoinCqlBlock.cs
- XPathScanner.cs
- ShutDownListener.cs
- WebSysDisplayNameAttribute.cs
- CancelEventArgs.cs
- LineVisual.cs
- SqlConnectionFactory.cs
- RectangleGeometry.cs
- Lease.cs
- TypeLoadException.cs
- RefreshPropertiesAttribute.cs
- ItemAutomationPeer.cs
- DelegatingConfigHost.cs
- ReadonlyMessageFilter.cs
- CultureSpecificCharacterBufferRange.cs
- loginstatus.cs
- DataControlFieldCell.cs
- SqlUdtInfo.cs
- SudsCommon.cs
- PropertyToken.cs
- TreeNodeClickEventArgs.cs
- DesignBinding.cs
- CalculatedColumn.cs
- SafeCoTaskMem.cs
- ArrayElementGridEntry.cs
- IisTraceListener.cs
- AppDomainShutdownMonitor.cs
- HttpCookiesSection.cs
- MultiView.cs
- WebPartTransformerCollection.cs
- Int16KeyFrameCollection.cs
- SmtpDigestAuthenticationModule.cs
- SignedPkcs7.cs
- DataGridPagerStyle.cs
- WpfKnownMemberInvoker.cs
- BrowserDefinitionCollection.cs
- JoinTreeNode.cs
- SamlConstants.cs
- KeyBinding.cs
- AttributeEmitter.cs
- InvalidBodyAccessException.cs
- DtrList.cs
- WmlFormAdapter.cs
- InvalidBodyAccessException.cs
- ClrPerspective.cs
- CommonDialog.cs
- PasswordRecovery.cs
- _ContextAwareResult.cs
- Int32CAMarshaler.cs
- HashHelpers.cs
- WebPartConnectionsConfigureVerb.cs
- Environment.cs
- ExponentialEase.cs
- GraphicsContainer.cs
- CompilationRelaxations.cs
- X509Extension.cs