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
- FormatVersion.cs
- CqlWriter.cs
- TrackBarRenderer.cs
- Assign.cs
- GacUtil.cs
- SerialPort.cs
- InternalSafeNativeMethods.cs
- Util.cs
- ValidationPropertyAttribute.cs
- Cursor.cs
- SendAgentStatusRequest.cs
- ErrorCodes.cs
- lengthconverter.cs
- DataGridViewRowCancelEventArgs.cs
- DependencyPropertyConverter.cs
- MouseOverProperty.cs
- ParamArrayAttribute.cs
- XmlWrappingWriter.cs
- FixedDSBuilder.cs
- ArrangedElementCollection.cs
- ControlCachePolicy.cs
- AspNetCacheProfileAttribute.cs
- Calendar.cs
- QueueProcessor.cs
- AliasExpr.cs
- TypeDescriptor.cs
- LifetimeServices.cs
- Processor.cs
- BatchWriter.cs
- AuthenticationModuleElement.cs
- CounterSet.cs
- MemberExpression.cs
- ImageClickEventArgs.cs
- CodeMemberMethod.cs
- QuaternionIndependentAnimationStorage.cs
- PublishLicense.cs
- WebPartDisplayMode.cs
- HttpHandlersSection.cs
- ListBindingHelper.cs
- NativeMethods.cs
- DiagnosticTraceSource.cs
- RelationalExpressions.cs
- IResourceProvider.cs
- EditorPartChrome.cs
- basevalidator.cs
- SelectionProviderWrapper.cs
- ArrayExtension.cs
- PropertyConverter.cs
- BindingExpressionUncommonField.cs
- ListControlBoundActionList.cs
- CodeDirectiveCollection.cs
- tooltip.cs
- Int32Rect.cs
- WebResponse.cs
- ChangeTracker.cs
- HandlerFactoryWrapper.cs
- DoubleAnimationUsingPath.cs
- RewritingProcessor.cs
- ConfigurationSectionGroupCollection.cs
- TreeWalkHelper.cs
- SimpleNameService.cs
- WindowsIPAddress.cs
- GeneralTransform3D.cs
- UIElementParaClient.cs
- ImportOptions.cs
- unsafenativemethodstextservices.cs
- ConfigurationStrings.cs
- UserControlAutomationPeer.cs
- HierarchicalDataSourceControl.cs
- DescendantOverDescendantQuery.cs
- handlecollector.cs
- GeometryModel3D.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- Slider.cs
- PublisherIdentityPermission.cs
- SafeReversePInvokeHandle.cs
- LogicalTreeHelper.cs
- Brushes.cs
- TraceListeners.cs
- TableHeaderCell.cs
- CacheForPrimitiveTypes.cs
- WebPartDesigner.cs
- DataViewListener.cs
- StorageComplexPropertyMapping.cs
- ObsoleteAttribute.cs
- ClientSettingsProvider.cs
- DataGridColumnCollection.cs
- DataGridCellsPanel.cs
- InputLanguage.cs
- SecurityVersion.cs
- UriSectionData.cs
- ObjectTag.cs
- TemplateField.cs
- ObjectReferenceStack.cs
- OpenTypeLayoutCache.cs
- RemoteWebConfigurationHostStream.cs
- MimeWriter.cs
- DataServiceProcessingPipeline.cs
- DataAccessor.cs
- ReaderContextStackData.cs