Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- XmlnsDictionary.cs
- CodeIdentifiers.cs
- RedBlackList.cs
- CodePrimitiveExpression.cs
- input.cs
- UniqueEventHelper.cs
- HttpsChannelFactory.cs
- RootBrowserWindowAutomationPeer.cs
- BitmapData.cs
- Membership.cs
- ZipIOCentralDirectoryBlock.cs
- ListViewAutomationPeer.cs
- WithParamAction.cs
- IndexingContentUnit.cs
- TransformValueSerializer.cs
- DesignerFrame.cs
- TypeResolvingOptions.cs
- WeakReferenceEnumerator.cs
- FlagsAttribute.cs
- WmlPageAdapter.cs
- EnumType.cs
- MetadataCacheItem.cs
- ApplicationHost.cs
- DateTimePicker.cs
- XsdBuilder.cs
- OneWayElement.cs
- RegionIterator.cs
- CompositeDataBoundControl.cs
- ReflectionTypeLoadException.cs
- DbConnectionPoolOptions.cs
- AppendHelper.cs
- OneOfTypeConst.cs
- WeakReference.cs
- ToolStripItemDataObject.cs
- NotSupportedException.cs
- InProcStateClientManager.cs
- TextSelectionProcessor.cs
- CornerRadius.cs
- ToolStripContentPanel.cs
- Content.cs
- NextPreviousPagerField.cs
- DataGridTemplateColumn.cs
- BasicBrowserDialog.cs
- MessageHeaderAttribute.cs
- AttachmentCollection.cs
- ByteAnimation.cs
- TableLayoutPanel.cs
- EventBuilder.cs
- WebPartEditVerb.cs
- CodeCommentStatementCollection.cs
- fixedPageContentExtractor.cs
- ZipPackagePart.cs
- IPEndPointCollection.cs
- PropertyMetadata.cs
- HttpDigestClientCredential.cs
- StateElementCollection.cs
- CodeRegionDirective.cs
- Int16AnimationBase.cs
- StorageAssociationTypeMapping.cs
- GeneralTransform3DGroup.cs
- Variant.cs
- Knowncolors.cs
- StorageInfo.cs
- HttpModuleAction.cs
- SByteStorage.cs
- EventProvider.cs
- TabControlDesigner.cs
- FontNamesConverter.cs
- TableRowGroup.cs
- InvokePattern.cs
- ExtensionQuery.cs
- AnnotationMap.cs
- PolicyLevel.cs
- MouseDevice.cs
- RoutingEndpointTrait.cs
- IChannel.cs
- EmptyReadOnlyDictionaryInternal.cs
- LinkedResourceCollection.cs
- XmlElementAttribute.cs
- DnsPermission.cs
- HttpRequestTraceRecord.cs
- WhiteSpaceTrimStringConverter.cs
- CorrelationExtension.cs
- DefaultExpression.cs
- AsyncStreamReader.cs
- ColorMatrix.cs
- RouteData.cs
- CustomAttributeSerializer.cs
- rsa.cs
- MediaContext.cs
- PageStatePersister.cs
- ObjectContext.cs
- InfoCardArgumentException.cs
- DynamicDataResources.Designer.cs
- ConditionalAttribute.cs
- cookieexception.cs
- ActiveXHelper.cs
- FrameAutomationPeer.cs
- UserControl.cs
- RuleSettings.cs