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
- Label.cs
- MemberAccessException.cs
- DecoderExceptionFallback.cs
- CodeThrowExceptionStatement.cs
- EncoderParameters.cs
- MeshGeometry3D.cs
- EdmValidator.cs
- Variable.cs
- ConfigXmlAttribute.cs
- SqlUnionizer.cs
- AccessibleObject.cs
- BuildProvider.cs
- VectorAnimationBase.cs
- Expression.cs
- OLEDB_Enum.cs
- CodeParameterDeclarationExpressionCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- TypeRestriction.cs
- SqlVersion.cs
- Model3DGroup.cs
- TemplateApplicationHelper.cs
- ListenerServiceInstallComponent.cs
- DecoderNLS.cs
- LinkUtilities.cs
- HelpProvider.cs
- DrawingCollection.cs
- DBConnection.cs
- MachineKeyConverter.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- DiscoveryClientDuplexChannel.cs
- ExecutionEngineException.cs
- XPathCompileException.cs
- SweepDirectionValidation.cs
- ManifestSignedXml.cs
- ReversePositionQuery.cs
- CalendarDay.cs
- DependencyPropertyHelper.cs
- TerminatorSinks.cs
- TextEditorCharacters.cs
- SqlDataSourceCommandParser.cs
- TreeIterators.cs
- SystemFonts.cs
- StorageBasedPackageProperties.cs
- ManipulationVelocities.cs
- KnownTypesProvider.cs
- TypeUtil.cs
- MailMessageEventArgs.cs
- Model3DCollection.cs
- Suspend.cs
- DBSqlParserColumnCollection.cs
- TraceLevelStore.cs
- PolyLineSegment.cs
- ThreadStateException.cs
- ExpressionBinding.cs
- ProtocolsConfigurationEntry.cs
- ServerValidateEventArgs.cs
- DataGridRow.cs
- _SslStream.cs
- RecordManager.cs
- CutCopyPasteHelper.cs
- DbConnectionStringBuilder.cs
- Odbc32.cs
- ConnectionManagementElementCollection.cs
- SqlClientWrapperSmiStream.cs
- XmlDataFileEditor.cs
- WebConfigurationFileMap.cs
- AuthorizationRule.cs
- FieldMetadata.cs
- CaseInsensitiveHashCodeProvider.cs
- InProcStateClientManager.cs
- ManagedCodeMarkers.cs
- BufferedGraphicsContext.cs
- EventRoute.cs
- StrokeFIndices.cs
- TagElement.cs
- DataGridViewCellCollection.cs
- NextPreviousPagerField.cs
- GenerateTemporaryAssemblyTask.cs
- ConnectionsZone.cs
- RootBrowserWindowAutomationPeer.cs
- MonitorWrapper.cs
- AnnotationAuthorChangedEventArgs.cs
- DataGridViewCellParsingEventArgs.cs
- KeyPressEvent.cs
- Message.cs
- TransactedReceiveData.cs
- ManagementOperationWatcher.cs
- SqlProfileProvider.cs
- KnownAssemblyEntry.cs
- XmlValueConverter.cs
- TakeOrSkipQueryOperator.cs
- PkcsMisc.cs
- GridViewItemAutomationPeer.cs
- XmlDocumentType.cs
- HtmlTextArea.cs
- DataObjectCopyingEventArgs.cs
- StandardCommands.cs
- WindowsScrollBar.cs
- ArrayTypeMismatchException.cs
- CodeRemoveEventStatement.cs