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
- ExecutionEngineException.cs
- Collection.cs
- ThaiBuddhistCalendar.cs
- RecognizedAudio.cs
- TypeUtils.cs
- SrgsSubset.cs
- TextPenaltyModule.cs
- XmlSchemaObjectCollection.cs
- SrgsElement.cs
- InputMethod.cs
- FontEmbeddingManager.cs
- ComplexLine.cs
- XmlResolver.cs
- ConfigurationStrings.cs
- BaseParser.cs
- ReadOnlyAttribute.cs
- XamlSerializer.cs
- ExceptQueryOperator.cs
- PassportAuthentication.cs
- VirtualDirectoryMappingCollection.cs
- SymLanguageVendor.cs
- ADConnectionHelper.cs
- SecurityTokenInclusionMode.cs
- WsdlInspector.cs
- OleDbDataReader.cs
- NotifyParentPropertyAttribute.cs
- CodeConditionStatement.cs
- ResourcesChangeInfo.cs
- CacheOutputQuery.cs
- AxHostDesigner.cs
- RSACryptoServiceProvider.cs
- DispatcherHookEventArgs.cs
- ReverseInheritProperty.cs
- DrawingImage.cs
- TextEffect.cs
- AggregateNode.cs
- _CommandStream.cs
- ItemDragEvent.cs
- SpeechUI.cs
- SqlXmlStorage.cs
- SelectionBorderGlyph.cs
- WorkflowServiceNamespace.cs
- NativeMethods.cs
- ReadOnlyPropertyMetadata.cs
- ImmComposition.cs
- TextFormatterHost.cs
- CodeGenerator.cs
- Translator.cs
- DetailsViewModeEventArgs.cs
- NullableConverter.cs
- TreeNodeStyle.cs
- InlinedAggregationOperatorEnumerator.cs
- ExpressionEditorSheet.cs
- StylusDownEventArgs.cs
- SchemaSetCompiler.cs
- MoveSizeWinEventHandler.cs
- IndependentAnimationStorage.cs
- SelectionEditor.cs
- XmlBufferReader.cs
- SelectionItemPattern.cs
- DescendantOverDescendantQuery.cs
- RuntimeResourceSet.cs
- Keyboard.cs
- hresults.cs
- HttpCachePolicyElement.cs
- ColumnMapCopier.cs
- PolicyValidationException.cs
- ClientSettingsProvider.cs
- UserPreferenceChangingEventArgs.cs
- SecureUICommand.cs
- RuleInfoComparer.cs
- TaskFactory.cs
- Converter.cs
- TypeNameConverter.cs
- FileCodeGroup.cs
- WebBrowserPermission.cs
- GridViewSortEventArgs.cs
- TreeView.cs
- InvalidPrinterException.cs
- BufferedGraphics.cs
- XamlTreeBuilderBamlRecordWriter.cs
- SchemaImporterExtensionElementCollection.cs
- Header.cs
- StorageMappingItemLoader.cs
- ViewStateAttachedPropertyFeature.cs
- BamlLocalizationDictionary.cs
- _BufferOffsetSize.cs
- FixedPage.cs
- SimpleRecyclingCache.cs
- DataServiceBehavior.cs
- NumberFormatter.cs
- AttributeInfo.cs
- ReverseQueryOperator.cs
- ToolTipService.cs
- TextChangedEventArgs.cs
- GPStream.cs
- SerializableAttribute.cs
- Accessible.cs
- StandardOleMarshalObject.cs
- PostBackTrigger.cs