Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / AssociationSet.cs / 1305376 / AssociationSet.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- SectionVisual.cs
- HtmlSelectionListAdapter.cs
- CompletionBookmark.cs
- Stacktrace.cs
- WebPartConnectionsCloseVerb.cs
- NamedPipeTransportManager.cs
- TreeIterator.cs
- ContextStaticAttribute.cs
- EntityContainer.cs
- VirtualDirectoryMappingCollection.cs
- IndentTextWriter.cs
- DecimalKeyFrameCollection.cs
- WindowsRichEdit.cs
- ReaderWriterLockWrapper.cs
- ArraySubsetEnumerator.cs
- COM2PropertyDescriptor.cs
- SynchronousChannel.cs
- sqlstateclientmanager.cs
- ProfileSettingsCollection.cs
- TabControlToolboxItem.cs
- HttpHandlerAction.cs
- BitmapEffectvisualstate.cs
- State.cs
- MarkupExtensionParser.cs
- PkcsUtils.cs
- Row.cs
- StringArrayConverter.cs
- MobileUserControlDesigner.cs
- Label.cs
- RequestCachePolicy.cs
- MonthChangedEventArgs.cs
- ListViewTableCell.cs
- StringArrayConverter.cs
- TypeBuilder.cs
- ZipIOCentralDirectoryBlock.cs
- FullTextState.cs
- WebServiceTypeData.cs
- RelationshipEndMember.cs
- SamlDoNotCacheCondition.cs
- _AutoWebProxyScriptHelper.cs
- AuthenticationModuleElement.cs
- GetPageCompletedEventArgs.cs
- DigitShape.cs
- PolyBezierSegmentFigureLogic.cs
- DataGridViewTopRowAccessibleObject.cs
- datacache.cs
- MouseButton.cs
- PathFigureCollectionValueSerializer.cs
- TransformedBitmap.cs
- IPPacketInformation.cs
- SectionUpdates.cs
- AndMessageFilter.cs
- RecommendedAsConfigurableAttribute.cs
- HttpHandlerAction.cs
- NativeRecognizer.cs
- VarInfo.cs
- Missing.cs
- SmtpNetworkElement.cs
- XmlNodeReader.cs
- StoreContentChangedEventArgs.cs
- PathSegmentCollection.cs
- LogicalExpr.cs
- ThreadExceptionDialog.cs
- cookiecollection.cs
- VerifyHashRequest.cs
- X509Certificate2Collection.cs
- DataGrid.cs
- ConnectionStringsExpressionBuilder.cs
- PageThemeBuildProvider.cs
- CompositeDesignerAccessibleObject.cs
- PointCollectionConverter.cs
- AudioSignalProblemOccurredEventArgs.cs
- CheckedListBox.cs
- Int16AnimationUsingKeyFrames.cs
- SmiEventSink_DeferedProcessing.cs
- GlyphTypeface.cs
- DefaultPropertyAttribute.cs
- WindowsIdentity.cs
- DataObjectFieldAttribute.cs
- ElementAction.cs
- Screen.cs
- DrawingAttributesDefaultValueFactory.cs
- Tag.cs
- ProcessHostServerConfig.cs
- TypeLibConverter.cs
- DataGridViewRowEventArgs.cs
- MiniConstructorInfo.cs
- XmlBinaryWriterSession.cs
- CommandValueSerializer.cs
- InkCanvasFeedbackAdorner.cs
- WebZone.cs
- SetIterators.cs
- AuthenticatingEventArgs.cs
- XPathNodeList.cs
- FontCollection.cs
- XPathAxisIterator.cs
- ICspAsymmetricAlgorithm.cs
- GlobalizationSection.cs
- FormattedTextSymbols.cs
- Cursor.cs