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
- SpecialFolderEnumConverter.cs
- TextRunTypographyProperties.cs
- ChtmlTextWriter.cs
- ToolStripPanel.cs
- QueryParameter.cs
- XamlDesignerSerializationManager.cs
- DbProviderFactories.cs
- WhitespaceRuleLookup.cs
- OleDbPropertySetGuid.cs
- XmlBindingWorker.cs
- PropertyRecord.cs
- CacheHelper.cs
- TextFormatterContext.cs
- Binding.cs
- ColumnMapCopier.cs
- BinaryWriter.cs
- ConstraintManager.cs
- ToolStripSeparatorRenderEventArgs.cs
- DockAndAnchorLayout.cs
- WindowsListViewGroup.cs
- PhonemeConverter.cs
- ColorComboBox.cs
- HwndSourceKeyboardInputSite.cs
- ScriptingJsonSerializationSection.cs
- XXXInfos.cs
- RemoteWebConfigurationHostServer.cs
- SHA256Cng.cs
- SubclassTypeValidatorAttribute.cs
- LongTypeConverter.cs
- SqlIdentifier.cs
- TimeSpan.cs
- SymbolEqualComparer.cs
- Schema.cs
- ClientConvert.cs
- OverflowException.cs
- LockedActivityGlyph.cs
- SpecularMaterial.cs
- TogglePatternIdentifiers.cs
- SuppressMessageAttribute.cs
- XmlSerializerVersionAttribute.cs
- ProxyManager.cs
- EntitySqlException.cs
- VirtualPathProvider.cs
- MetricEntry.cs
- TextDecorationUnitValidation.cs
- DataBindingCollection.cs
- DiagnosticTraceSchemas.cs
- KeyedCollection.cs
- EventHandlersStore.cs
- TypographyProperties.cs
- ToolZone.cs
- InvalidOperationException.cs
- SafeThemeHandle.cs
- PointValueSerializer.cs
- FrameAutomationPeer.cs
- StandardRuntimeEnumValidator.cs
- ProcessHostServerConfig.cs
- SoapSchemaImporter.cs
- Calendar.cs
- UpdateProgress.cs
- WizardPanelChangingEventArgs.cs
- UnsafeNativeMethods.cs
- coordinatorfactory.cs
- ScrollViewerAutomationPeer.cs
- HttpClientCertificate.cs
- QilGeneratorEnv.cs
- XmlReaderSettings.cs
- NamespaceQuery.cs
- DispatcherObject.cs
- SQLBytes.cs
- GuidConverter.cs
- ColumnClickEvent.cs
- StorageBasedPackageProperties.cs
- ObjectTag.cs
- CodeGotoStatement.cs
- odbcmetadatafactory.cs
- TickBar.cs
- ConfigurationElement.cs
- OneWayElement.cs
- AddInProcess.cs
- CodeMethodMap.cs
- ToolStripDesignerUtils.cs
- MatrixStack.cs
- RelatedCurrencyManager.cs
- mediaeventshelper.cs
- LogManagementAsyncResult.cs
- XmlTypeMapping.cs
- DataSetFieldSchema.cs
- ColorInterpolationModeValidation.cs
- ParseHttpDate.cs
- TreeViewHitTestInfo.cs
- EventEntry.cs
- EventMappingSettings.cs
- _Semaphore.cs
- AsymmetricAlgorithm.cs
- AttributeQuery.cs
- ConnectionManagementElementCollection.cs
- ChangeBlockUndoRecord.cs
- QilInvokeEarlyBound.cs
- PointLightBase.cs