Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- JsonReader.cs
- DeploymentExceptionMapper.cs
- ExpressionConverter.cs
- StringFreezingAttribute.cs
- StreamGeometry.cs
- TreeView.cs
- DesignerVerbCollection.cs
- Line.cs
- CodeTypeOfExpression.cs
- BaseServiceProvider.cs
- StorageFunctionMapping.cs
- DirectoryNotFoundException.cs
- PublisherIdentityPermission.cs
- CommandConverter.cs
- FormsAuthenticationConfiguration.cs
- SmiConnection.cs
- DiscoveryInnerClientManaged11.cs
- DataGridViewButtonCell.cs
- AnnotationService.cs
- GiveFeedbackEventArgs.cs
- DBConcurrencyException.cs
- ApplicationInfo.cs
- InvokeCompletedEventArgs.cs
- CharacterBufferReference.cs
- WinInet.cs
- Component.cs
- UIServiceHelper.cs
- DefaultSerializationProviderAttribute.cs
- Utility.cs
- SharedPersonalizationStateInfo.cs
- CodeGeneratorAttribute.cs
- StateDesigner.TransitionInfo.cs
- Light.cs
- File.cs
- FixedTextBuilder.cs
- X509Certificate.cs
- PrivilegedConfigurationManager.cs
- SymbolEqualComparer.cs
- SafeNativeMethods.cs
- ConfigXmlElement.cs
- EventLevel.cs
- MarkupProperty.cs
- OverflowException.cs
- XmlReaderSettings.cs
- SqlMethodAttribute.cs
- AssemblyAttributes.cs
- DesignerActionUI.cs
- Point3DKeyFrameCollection.cs
- ToolStripItem.cs
- RelOps.cs
- UnitySerializationHolder.cs
- ChannelPoolSettingsElement.cs
- UserNameSecurityTokenParameters.cs
- ConnectionManagementElementCollection.cs
- mansign.cs
- RegexCompiler.cs
- Listbox.cs
- ComponentConverter.cs
- PassportAuthenticationModule.cs
- CheckBox.cs
- WindowsSecurityTokenAuthenticator.cs
- DataSvcMapFileSerializer.cs
- ColumnCollection.cs
- Invariant.cs
- D3DImage.cs
- SymbolTable.cs
- InternalCache.cs
- DataSourceControlBuilder.cs
- Thread.cs
- MailHeaderInfo.cs
- MailBnfHelper.cs
- UnauthorizedWebPart.cs
- WorkflowOperationAsyncResult.cs
- TypeDescriptionProviderAttribute.cs
- BinaryReader.cs
- ListBindingHelper.cs
- _CookieModule.cs
- AttributeCollection.cs
- EngineSite.cs
- DataSourceHelper.cs
- EdmToObjectNamespaceMap.cs
- CodeMemberField.cs
- ToolboxDataAttribute.cs
- SmtpMail.cs
- TextEffect.cs
- AnnouncementSendsAsyncResult.cs
- Registry.cs
- EncoderBestFitFallback.cs
- Root.cs
- ToolBarButton.cs
- ProcessDesigner.cs
- Parsers.cs
- XsdDataContractImporter.cs
- MdImport.cs
- NavigatingCancelEventArgs.cs
- EndOfStreamException.cs
- DataGridCellsPanel.cs
- DataStreams.cs
- VirtualPathData.cs
- UserControl.cs