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
- Size3D.cs
- TreeNode.cs
- HttpResponseInternalBase.cs
- WebPartEditorCancelVerb.cs
- FileRecordSequence.cs
- HtmlDocument.cs
- CorrelationInitializer.cs
- EntityClientCacheKey.cs
- DataGridViewTopRowAccessibleObject.cs
- BehaviorEditorPart.cs
- CodeSnippetStatement.cs
- CodeCommentStatementCollection.cs
- SchemaInfo.cs
- TreeBuilderBamlTranslator.cs
- _NestedSingleAsyncResult.cs
- SchemaCollectionCompiler.cs
- CalendarSelectionChangedEventArgs.cs
- PropertyRef.cs
- wmiprovider.cs
- InkCanvasFeedbackAdorner.cs
- BulletedListEventArgs.cs
- Inline.cs
- Certificate.cs
- ProbeMatchesApril2005.cs
- PrePrepareMethodAttribute.cs
- Scene3D.cs
- UICuesEvent.cs
- TextEndOfSegment.cs
- DelimitedListTraceListener.cs
- DataGridTableCollection.cs
- ErasingStroke.cs
- Vector.cs
- SerializationStore.cs
- MulticastDelegate.cs
- StructuralType.cs
- CachedPathData.cs
- BaseAsyncResult.cs
- ChineseLunisolarCalendar.cs
- PrintDocument.cs
- OuterGlowBitmapEffect.cs
- ProxyAttribute.cs
- QuotedStringFormatReader.cs
- XmlSchemaAnnotated.cs
- GenericParameterDataContract.cs
- RegularExpressionValidator.cs
- PropertyInfoSet.cs
- DataBindingCollection.cs
- CheckableControlBaseAdapter.cs
- ReflectionPermission.cs
- RangeValueProviderWrapper.cs
- SafeRegistryHandle.cs
- EntitySetBase.cs
- FontStretch.cs
- TwoPhaseCommitProxy.cs
- XmlQueryStaticData.cs
- DiagnosticsConfigurationHandler.cs
- ChineseLunisolarCalendar.cs
- MobileControlPersister.cs
- MessageBox.cs
- CollectionChangedEventManager.cs
- Activator.cs
- SafeTokenHandle.cs
- Trigger.cs
- XmlElementCollection.cs
- UiaCoreTypesApi.cs
- ProfessionalColors.cs
- MediaElement.cs
- WinInetCache.cs
- PriorityRange.cs
- InstallerTypeAttribute.cs
- HScrollProperties.cs
- XmlSchemaRedefine.cs
- InternalBufferOverflowException.cs
- SocketException.cs
- ReadOnlyTernaryTree.cs
- StorageEntitySetMapping.cs
- ObjectDataSourceFilteringEventArgs.cs
- HMACSHA512.cs
- RegexNode.cs
- QilTargetType.cs
- ActivityDesignerHelper.cs
- CodePropertyReferenceExpression.cs
- MetabaseServerConfig.cs
- BufferBuilder.cs
- ValidationPropertyAttribute.cs
- IsolatedStorageFile.cs
- UrlMappingCollection.cs
- xmlfixedPageInfo.cs
- CompilerParameters.cs
- AutomationElementIdentifiers.cs
- ServerValidateEventArgs.cs
- HwndAppCommandInputProvider.cs
- ComponentConverter.cs
- IPGlobalProperties.cs
- VerificationException.cs
- SecurityListenerSettingsLifetimeManager.cs
- CalloutQueueItem.cs
- ItemCollection.cs
- TraceData.cs
- AutomationPropertyInfo.cs