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
- HttpConfigurationSystem.cs
- AccessibilityApplicationManager.cs
- StickyNote.cs
- FormViewUpdateEventArgs.cs
- JournalEntry.cs
- Preprocessor.cs
- BezierSegment.cs
- SynchronizedDispatch.cs
- ValidationErrorCollection.cs
- SymLanguageType.cs
- FormViewUpdatedEventArgs.cs
- MetabaseServerConfig.cs
- FusionWrap.cs
- ErrorWebPart.cs
- CalendarSelectionChangedEventArgs.cs
- ActivityInstance.cs
- Comparer.cs
- FormsIdentity.cs
- NoneExcludedImageIndexConverter.cs
- MergeFilterQuery.cs
- _StreamFramer.cs
- CacheEntry.cs
- TemplateInstanceAttribute.cs
- GridItemCollection.cs
- ISAPIRuntime.cs
- Rules.cs
- PersistChildrenAttribute.cs
- ItemPager.cs
- ObjectPersistData.cs
- _SpnDictionary.cs
- CustomAttribute.cs
- StorageAssociationTypeMapping.cs
- BuildProvider.cs
- PixelShader.cs
- ImageField.cs
- SHA384Managed.cs
- ApplicationTrust.cs
- WmlTextViewAdapter.cs
- DesignerCategoryAttribute.cs
- PaperSize.cs
- HttpRequest.cs
- JavaScriptSerializer.cs
- NameValuePair.cs
- TreeViewAutomationPeer.cs
- ElementNotAvailableException.cs
- TemplateKey.cs
- RequiredFieldValidator.cs
- UnknownBitmapEncoder.cs
- ModelTypeConverter.cs
- ScriptModule.cs
- FieldToken.cs
- ProfessionalColors.cs
- MatrixTransform.cs
- ObservableCollection.cs
- NamedObject.cs
- MetadataCache.cs
- ButtonBaseAutomationPeer.cs
- PrintDialogException.cs
- CommandID.cs
- SqlGatherConsumedAliases.cs
- DESCryptoServiceProvider.cs
- SerializationBinder.cs
- PropertySegmentSerializer.cs
- FileLoadException.cs
- AccessControlEntry.cs
- EventWaitHandleSecurity.cs
- VirtualPath.cs
- SecurityDescriptor.cs
- HttpRuntimeSection.cs
- RadioButton.cs
- CapacityStreamGeometryContext.cs
- HeaderUtility.cs
- TraceContextRecord.cs
- ItemContainerGenerator.cs
- LogicalMethodInfo.cs
- sqlstateclientmanager.cs
- TextViewBase.cs
- SEHException.cs
- SrgsToken.cs
- indexingfiltermarshaler.cs
- IndexOutOfRangeException.cs
- ParameterBuilder.cs
- DesigntimeLicenseContext.cs
- DesignerTransaction.cs
- NavigationWindowAutomationPeer.cs
- SkinBuilder.cs
- DataSourceSelectArguments.cs
- NativeMethods.cs
- StreamResourceInfo.cs
- ConfigurationConverterBase.cs
- Point3DCollection.cs
- TextDecorations.cs
- Timer.cs
- ParameterCollectionEditorForm.cs
- IdentityValidationException.cs
- DependencyPropertyHelper.cs
- DesignerDataSchemaClass.cs
- RegexCaptureCollection.cs
- ScrollViewer.cs
- ImageMap.cs