Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- ToolStripOverflowButton.cs
- ObjectContext.cs
- ListViewItemEventArgs.cs
- datacache.cs
- WebPartManagerInternals.cs
- OrthographicCamera.cs
- XmlSignificantWhitespace.cs
- SelectionList.cs
- WebPartManager.cs
- Select.cs
- ListViewSortEventArgs.cs
- DropDownButton.cs
- CreatingCookieEventArgs.cs
- CodeThrowExceptionStatement.cs
- ListBindableAttribute.cs
- OverrideMode.cs
- __Filters.cs
- XmlNavigatorStack.cs
- FindResponse.cs
- MutableAssemblyCacheEntry.cs
- EventLogInternal.cs
- Point3DCollection.cs
- LinkedDataMemberFieldEditor.cs
- BindingExpression.cs
- unsafeIndexingFilterStream.cs
- EntityException.cs
- InternalsVisibleToAttribute.cs
- SoapServerProtocol.cs
- StreamGeometryContext.cs
- SqlHelper.cs
- DefaultAuthorizationContext.cs
- TemplateKey.cs
- SystemIPv4InterfaceProperties.cs
- QilCloneVisitor.cs
- GenericEnumConverter.cs
- TypeDescriptionProviderAttribute.cs
- Parser.cs
- sqlstateclientmanager.cs
- XamlTypeMapper.cs
- ClientScriptManager.cs
- FilterRepeater.cs
- RootProfilePropertySettingsCollection.cs
- MetadataHelper.cs
- Style.cs
- DocumentPageView.cs
- DiffuseMaterial.cs
- CheckPair.cs
- RangeEnumerable.cs
- UpdateProgress.cs
- DefaultObjectMappingItemCollection.cs
- OracleException.cs
- PropertyGrid.cs
- StylusPointProperties.cs
- ResXResourceReader.cs
- FrameSecurityDescriptor.cs
- OrderedDictionary.cs
- ColumnResizeUndoUnit.cs
- ProfileParameter.cs
- MouseCaptureWithinProperty.cs
- Point3DValueSerializer.cs
- MimeImporter.cs
- TextTreePropertyUndoUnit.cs
- NamespaceInfo.cs
- ActiveXHelper.cs
- SQLInt64Storage.cs
- IApplicationTrustManager.cs
- FolderBrowserDialog.cs
- DataServiceSaveChangesEventArgs.cs
- Image.cs
- DataGridTextBox.cs
- MissingMemberException.cs
- ShapeTypeface.cs
- Transform.cs
- DecoderFallback.cs
- DataTableCollection.cs
- Baml2006ReaderFrame.cs
- ColorConvertedBitmap.cs
- PersistChildrenAttribute.cs
- FieldMetadata.cs
- XamlTemplateSerializer.cs
- OutputCacheProfileCollection.cs
- XmlSchemaSimpleContentRestriction.cs
- DbMetaDataCollectionNames.cs
- NativeMethods.cs
- Automation.cs
- XmlEncApr2001.cs
- SecurityStandardsManager.cs
- ErrorFormatterPage.cs
- DataBindEngine.cs
- InternalMappingException.cs
- Certificate.cs
- XmlConvert.cs
- PerfService.cs
- LineServicesCallbacks.cs
- MachineKey.cs
- DynamicValidatorEventArgs.cs
- MessageBox.cs
- _CacheStreams.cs
- PersonalizationStateQuery.cs
- Parsers.cs