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
- HierarchicalDataTemplate.cs
- GroupQuery.cs
- Interlocked.cs
- OleStrCAMarshaler.cs
- JsonXmlDataContract.cs
- PackagePart.cs
- WinFormsComponentEditor.cs
- OutputCacheProfile.cs
- SqlNamer.cs
- UrlMappingsSection.cs
- DataDocumentXPathNavigator.cs
- EnumerationRangeValidationUtil.cs
- StringArrayConverter.cs
- GlyphInfoList.cs
- ErrorRuntimeConfig.cs
- Line.cs
- _HeaderInfoTable.cs
- Instrumentation.cs
- EventLog.cs
- CommonGetThemePartSize.cs
- XPathParser.cs
- GridViewDeleteEventArgs.cs
- PeerToPeerException.cs
- HttpApplicationStateBase.cs
- ScrollBarRenderer.cs
- OpenFileDialog.cs
- Table.cs
- CustomSignedXml.cs
- XamlToRtfParser.cs
- StringAnimationUsingKeyFrames.cs
- ApplicationBuildProvider.cs
- FieldAccessException.cs
- Stacktrace.cs
- XmlSchemaSimpleContentExtension.cs
- CodeIndexerExpression.cs
- SpeechRecognizer.cs
- HttpResponse.cs
- Item.cs
- CodeNamespace.cs
- InputBindingCollection.cs
- ScriptReferenceBase.cs
- ProcessInfo.cs
- RunClient.cs
- Matrix.cs
- ZeroOpNode.cs
- SID.cs
- ScriptMethodAttribute.cs
- Region.cs
- TripleDES.cs
- DataListGeneralPage.cs
- WindowsGrip.cs
- HtmlLiteralTextAdapter.cs
- LineGeometry.cs
- SelectionRange.cs
- RandomNumberGenerator.cs
- NonClientArea.cs
- SmtpFailedRecipientException.cs
- _Events.cs
- LayoutTable.cs
- WindowsMenu.cs
- StatusBarAutomationPeer.cs
- ExpressionEvaluator.cs
- XmlTextReaderImpl.cs
- ExpandCollapsePattern.cs
- UnknownBitmapEncoder.cs
- ListViewCommandEventArgs.cs
- DataTableReaderListener.cs
- BaseValidatorDesigner.cs
- PointF.cs
- CompositeScriptReferenceEventArgs.cs
- SafeEventLogReadHandle.cs
- sqlcontext.cs
- RuntimeWrappedException.cs
- ApplicationServiceManager.cs
- WindowsPen.cs
- BuildProviderAppliesToAttribute.cs
- TraceListener.cs
- BooleanAnimationBase.cs
- MdImport.cs
- filewebrequest.cs
- PerformanceCountersBase.cs
- BufferedReceiveElement.cs
- SizeF.cs
- XMLSchema.cs
- DispatcherSynchronizationContext.cs
- ClientConfigPaths.cs
- EncodingInfo.cs
- SpeechAudioFormatInfo.cs
- DirtyTextRange.cs
- MenuItemStyleCollection.cs
- VerificationAttribute.cs
- SQLInt32Storage.cs
- Int32KeyFrameCollection.cs
- Evaluator.cs
- GlyphInfoList.cs
- DocumentOrderQuery.cs
- SkewTransform.cs
- RectangleGeometry.cs
- GlobalEventManager.cs
- SystemException.cs