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
- ToolboxItemAttribute.cs
- TextServicesPropertyRanges.cs
- SingleAnimation.cs
- ItemCollection.cs
- XmlSchemaFacet.cs
- TripleDES.cs
- ServiceProviders.cs
- CqlWriter.cs
- TreeNodeCollection.cs
- RootNamespaceAttribute.cs
- IsolatedStorageSecurityState.cs
- BrowserCapabilitiesCompiler.cs
- StoryFragments.cs
- MobileCategoryAttribute.cs
- WhitespaceReader.cs
- EntitySetBase.cs
- Visual.cs
- TableLayoutStyle.cs
- LocalIdKeyIdentifierClause.cs
- GeometryGroup.cs
- _TLSstream.cs
- WizardStepBase.cs
- HttpListenerRequest.cs
- SettingsAttributeDictionary.cs
- SessionStateModule.cs
- TextSimpleMarkerProperties.cs
- OutputCacheProfile.cs
- LocalBuilder.cs
- QueryGenerator.cs
- CurrencyWrapper.cs
- Canvas.cs
- ThreadAttributes.cs
- AlgoModule.cs
- DiscriminatorMap.cs
- ToolStripTextBox.cs
- WsatStrings.cs
- XmlEnumAttribute.cs
- KeySplineConverter.cs
- TileBrush.cs
- SpeechDetectedEventArgs.cs
- XpsDigitalSignature.cs
- GridViewCancelEditEventArgs.cs
- ToolStripMenuItem.cs
- TextSelectionHelper.cs
- EventBuilder.cs
- X509Certificate2Collection.cs
- QfeChecker.cs
- CompilerErrorCollection.cs
- ImageMap.cs
- DBCommand.cs
- ErrorWebPart.cs
- GrammarBuilder.cs
- SchemaElement.cs
- SafeCloseHandleCritical.cs
- XPathNodeList.cs
- IIS7WorkerRequest.cs
- OleDbRowUpdatedEvent.cs
- TemplateXamlTreeBuilder.cs
- GeometryDrawing.cs
- ToolboxComponentsCreatingEventArgs.cs
- SettingsBindableAttribute.cs
- ScriptIgnoreAttribute.cs
- X509Certificate.cs
- safelinkcollection.cs
- SmtpReplyReader.cs
- CacheDependency.cs
- PasswordDeriveBytes.cs
- XmlBinaryWriter.cs
- ClientSideQueueItem.cs
- TypeUtils.cs
- OdbcRowUpdatingEvent.cs
- FrameworkObject.cs
- MasterPageParser.cs
- DataSourceXmlAttributeAttribute.cs
- InstanceValue.cs
- DataGridViewLinkColumn.cs
- XamlTemplateSerializer.cs
- SizeConverter.cs
- FloaterBaseParagraph.cs
- SrgsToken.cs
- CaseStatementSlot.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- WbemException.cs
- XComponentModel.cs
- EntitySetBaseCollection.cs
- ListViewAutomationPeer.cs
- HostingEnvironmentException.cs
- SafeIUnknown.cs
- RedistVersionInfo.cs
- ErrorsHelper.cs
- HtmlInputText.cs
- XmlDomTextWriter.cs
- MetadataItemEmitter.cs
- HwndMouseInputProvider.cs
- TextSchema.cs
- EmptyQuery.cs
- IImplicitResourceProvider.cs
- EncryptedReference.cs
- PagedDataSource.cs
- RedistVersionInfo.cs