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
- FrameworkContentElement.cs
- WebPartDescriptionCollection.cs
- DataBoundControlHelper.cs
- XNodeValidator.cs
- FlowLayoutSettings.cs
- HMACSHA512.cs
- DifferencingCollection.cs
- VariantWrapper.cs
- DocumentGrid.cs
- IssuanceLicense.cs
- PropertyGeneratedEventArgs.cs
- EndpointIdentity.cs
- ConditionalAttribute.cs
- HandlerBase.cs
- WpfKnownTypeInvoker.cs
- DataReceivedEventArgs.cs
- ThreadSafeMessageFilterTable.cs
- ToolStripGripRenderEventArgs.cs
- DefaultEventAttribute.cs
- TextCompositionManager.cs
- SiteMapPath.cs
- PersonalizationDictionary.cs
- WsatConfiguration.cs
- InputLangChangeEvent.cs
- ListMarkerLine.cs
- ServicePointManagerElement.cs
- OneOfTypeConst.cs
- TypeSystem.cs
- CallContext.cs
- StrongNameIdentityPermission.cs
- EnvironmentPermission.cs
- AddInActivator.cs
- BindingMemberInfo.cs
- DbParameterCollectionHelper.cs
- TriggerBase.cs
- ErrorStyle.cs
- RealizationContext.cs
- BitmapDecoder.cs
- TdsRecordBufferSetter.cs
- XmlStreamNodeWriter.cs
- ParameterCollection.cs
- WorkflowDesignerMessageFilter.cs
- SmtpSection.cs
- SqlDataSourceRefreshSchemaForm.cs
- ViewBox.cs
- Context.cs
- SharedDp.cs
- TaskFormBase.cs
- HttpCacheParams.cs
- ObjectMaterializedEventArgs.cs
- XmlNodeChangedEventArgs.cs
- ServiceControllerDesigner.cs
- ServerIdentity.cs
- SelectionProviderWrapper.cs
- DrawingCollection.cs
- FocusWithinProperty.cs
- X500Name.cs
- Compress.cs
- ResolveMatchesApril2005.cs
- SafeThemeHandle.cs
- RuntimeArgumentHandle.cs
- ObjectSelectorEditor.cs
- FileDialogCustomPlaces.cs
- SizeAnimationUsingKeyFrames.cs
- ExpressionWriter.cs
- Encoder.cs
- DataGridViewAutoSizeModeEventArgs.cs
- EntityClassGenerator.cs
- ScaleTransform.cs
- CompilerError.cs
- IConvertible.cs
- TreeView.cs
- StrokeFIndices.cs
- BitmapVisualManager.cs
- InputElement.cs
- RectangleF.cs
- DiscriminatorMap.cs
- OperatorExpressions.cs
- BindingCompleteEventArgs.cs
- UncommonField.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- ToolboxControl.cs
- FullTextState.cs
- SmtpTransport.cs
- RewritingProcessor.cs
- ScrollProviderWrapper.cs
- FeatureSupport.cs
- _SslState.cs
- IndexOutOfRangeException.cs
- ScrollBar.cs
- ReadWriteSpinLock.cs
- ResourceType.cs
- DoubleAverageAggregationOperator.cs
- EntityDataSourceContainerNameConverter.cs
- DependsOnAttribute.cs
- DoWorkEventArgs.cs
- FilteredDataSetHelper.cs
- FieldBuilder.cs
- QilFactory.cs
- HandledMouseEvent.cs