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
- ExpressionCopier.cs
- hresults.cs
- COM2ExtendedTypeConverter.cs
- CssTextWriter.cs
- ActivityStateQuery.cs
- PagedDataSource.cs
- TextSelection.cs
- OleDbConnectionFactory.cs
- ProtectedConfigurationSection.cs
- DependentList.cs
- GregorianCalendarHelper.cs
- ReplyAdapterChannelListener.cs
- OrderByExpression.cs
- Vector.cs
- DesignerValidationSummaryAdapter.cs
- UInt64Storage.cs
- GenerateScriptTypeAttribute.cs
- FontFaceLayoutInfo.cs
- ScrollBar.cs
- _NestedMultipleAsyncResult.cs
- EUCJPEncoding.cs
- Aggregates.cs
- LayoutDump.cs
- DataListGeneralPage.cs
- SoapEnumAttribute.cs
- HttpListenerException.cs
- IdnMapping.cs
- PrintPreviewGraphics.cs
- XmlElementList.cs
- CollectionView.cs
- TdsParameterSetter.cs
- Utils.cs
- DetailsViewInsertedEventArgs.cs
- WindowsClientElement.cs
- CheckBoxAutomationPeer.cs
- ActivityExecutionWorkItem.cs
- RemotingServices.cs
- GridViewRowPresenter.cs
- DataGridViewCellStyle.cs
- NonBatchDirectoryCompiler.cs
- AnimationException.cs
- Models.cs
- Grid.cs
- StandardToolWindows.cs
- MenuBase.cs
- SQLRoleProvider.cs
- ProtocolsConfigurationHandler.cs
- ToolStripDesignerAvailabilityAttribute.cs
- OrCondition.cs
- ReceiveActivityValidator.cs
- SrgsToken.cs
- TextAutomationPeer.cs
- StylusCollection.cs
- OpCellTreeNode.cs
- ProjectionPathBuilder.cs
- PeerName.cs
- MaskPropertyEditor.cs
- EncryptedPackageFilter.cs
- FlagsAttribute.cs
- MonitorWrapper.cs
- ISAPIWorkerRequest.cs
- DbConvert.cs
- WeakRefEnumerator.cs
- TaiwanLunisolarCalendar.cs
- TextFormatterHost.cs
- XmlSchemaAnyAttribute.cs
- TextTreeUndoUnit.cs
- COM2TypeInfoProcessor.cs
- ReflectionUtil.cs
- LongSumAggregationOperator.cs
- cookie.cs
- HybridDictionary.cs
- RichTextBoxConstants.cs
- OperationParameterInfo.cs
- ExceptionValidationRule.cs
- StructureChangedEventArgs.cs
- PLINQETWProvider.cs
- DesignTimeData.cs
- IConvertible.cs
- MemoryRecordBuffer.cs
- BamlLocalizationDictionary.cs
- WarningException.cs
- MetadataSource.cs
- GPPOINTF.cs
- TypeBuilderInstantiation.cs
- FileDetails.cs
- InstanceData.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- Image.cs
- NotifyIcon.cs
- DataGridViewComponentPropertyGridSite.cs
- TrailingSpaceComparer.cs
- MatrixValueSerializer.cs
- ObjectParameterCollection.cs
- TextServicesContext.cs
- KeyInfo.cs
- CompositeScriptReference.cs
- WizardStepBase.cs
- LinkedList.cs
- TrustSection.cs