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
- SqlPersonalizationProvider.cs
- TargetInvocationException.cs
- ITextView.cs
- EncryptedData.cs
- Point3DKeyFrameCollection.cs
- AttributeSetAction.cs
- SectionXmlInfo.cs
- MenuBindingsEditor.cs
- BoundingRectTracker.cs
- QilName.cs
- RichTextBoxAutomationPeer.cs
- WindowsListViewGroupSubsetLink.cs
- SchemaInfo.cs
- XmlObjectSerializerReadContextComplex.cs
- XpsPackagingPolicy.cs
- SplitterEvent.cs
- StateFinalizationDesigner.cs
- WindowsListViewItem.cs
- MimeMapping.cs
- SiteMapProvider.cs
- MouseButtonEventArgs.cs
- DeferredElementTreeState.cs
- DocumentViewerBase.cs
- StringConcat.cs
- SafePEFileHandle.cs
- RadioButtonBaseAdapter.cs
- TagMapCollection.cs
- WebPartAuthorizationEventArgs.cs
- unitconverter.cs
- KeyFrames.cs
- UrlMappingCollection.cs
- AsyncOperationManager.cs
- ColorConverter.cs
- WebResourceUtil.cs
- TakeQueryOptionExpression.cs
- Identifier.cs
- WindowsGraphics.cs
- QilScopedVisitor.cs
- SqlDataSourceWizardForm.cs
- ToolBarButton.cs
- ZipPackagePart.cs
- DragEvent.cs
- GetImportFileNameRequest.cs
- QuadraticBezierSegment.cs
- GeneralTransform3DGroup.cs
- DataStreams.cs
- Connector.cs
- GridViewRow.cs
- SystemTcpStatistics.cs
- bindurihelper.cs
- SafeCryptoHandles.cs
- MappedMetaModel.cs
- ClientConfigurationHost.cs
- UpdateCommand.cs
- CharAnimationUsingKeyFrames.cs
- PathFigure.cs
- HttpPostLocalhostServerProtocol.cs
- SHA256.cs
- ipaddressinformationcollection.cs
- SqlClientWrapperSmiStream.cs
- DataTableReaderListener.cs
- CacheForPrimitiveTypes.cs
- PerformanceCountersElement.cs
- ListViewGroupItemCollection.cs
- XmlSchemaIdentityConstraint.cs
- ServiceNameCollection.cs
- ObfuscateAssemblyAttribute.cs
- _ScatterGatherBuffers.cs
- CultureSpecificCharacterBufferRange.cs
- DropDownList.cs
- RepeaterItemEventArgs.cs
- CancellationToken.cs
- PageRequestManager.cs
- CombinedGeometry.cs
- OlePropertyStructs.cs
- WindowsUpDown.cs
- WindowsGrip.cs
- DataGridCell.cs
- HealthMonitoringSection.cs
- AsymmetricKeyExchangeFormatter.cs
- ScriptDescriptor.cs
- StorageMappingItemCollection.cs
- VisualTreeUtils.cs
- DataTable.cs
- DoubleAverageAggregationOperator.cs
- DriveInfo.cs
- MultipartContentParser.cs
- EntryWrittenEventArgs.cs
- DiagnosticTraceSchemas.cs
- HttpCookie.cs
- LockingPersistenceProvider.cs
- XmlHelper.cs
- PopupRoot.cs
- UIAgentAsyncParams.cs
- Rfc2898DeriveBytes.cs
- RoleService.cs
- ObjectContext.cs
- Evaluator.cs
- ValidationHelper.cs
- AttachmentCollection.cs