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
- IntegerCollectionEditor.cs
- MembershipPasswordException.cs
- DebugView.cs
- figurelengthconverter.cs
- NativeMethods.cs
- InputMethodStateChangeEventArgs.cs
- AnnotationComponentManager.cs
- FormClosedEvent.cs
- IteratorFilter.cs
- WebPartConnectionsCloseVerb.cs
- Single.cs
- RowToParametersTransformer.cs
- FunctionImportElement.cs
- xml.cs
- StringBuilder.cs
- URLMembershipCondition.cs
- XmlQueryContext.cs
- PeerFlooder.cs
- RelatedCurrencyManager.cs
- AspNetSynchronizationContext.cs
- ProfilePropertySettingsCollection.cs
- MetadataArtifactLoaderCompositeFile.cs
- HostProtectionException.cs
- ColorConverter.cs
- CompositeFontFamily.cs
- BrowserCapabilitiesFactory35.cs
- DocumentReference.cs
- CommandEventArgs.cs
- TextRangeEditTables.cs
- Monitor.cs
- ListItemCollection.cs
- Vector3DConverter.cs
- MsmqProcessProtocolHandler.cs
- Light.cs
- _ProxyRegBlob.cs
- CompositeTypefaceMetrics.cs
- PhysicalAddress.cs
- KeyedHashAlgorithm.cs
- FlowDocumentReader.cs
- AddInServer.cs
- SoapElementAttribute.cs
- DataColumnChangeEvent.cs
- PathSegment.cs
- XmlNavigatorStack.cs
- MaskDescriptors.cs
- ResourceDefaultValueAttribute.cs
- DataGridViewColumnEventArgs.cs
- BrowserCapabilitiesFactory.cs
- ViewStateException.cs
- CodeSubDirectory.cs
- WebPartDescriptionCollection.cs
- SHA256CryptoServiceProvider.cs
- XPathBinder.cs
- XhtmlMobileTextWriter.cs
- GraphicsPathIterator.cs
- VarInfo.cs
- RijndaelCryptoServiceProvider.cs
- Error.cs
- UnregisterInfo.cs
- ToolStripPanelSelectionGlyph.cs
- SafeHGlobalHandleCritical.cs
- HandlerWithFactory.cs
- Matrix3D.cs
- UnsafeNativeMethods.cs
- LeafCellTreeNode.cs
- ThreadStartException.cs
- DeclarativeExpressionConditionDeclaration.cs
- QualifiedCellIdBoolean.cs
- X509PeerCertificateAuthentication.cs
- Point4DConverter.cs
- ResourceAssociationType.cs
- Error.cs
- ResourceDefaultValueAttribute.cs
- BevelBitmapEffect.cs
- EnumType.cs
- ValidationErrorEventArgs.cs
- HtmlTitle.cs
- PathFigureCollectionConverter.cs
- RegisteredArrayDeclaration.cs
- HttpSessionStateBase.cs
- filewebresponse.cs
- StylusPointPropertyUnit.cs
- TakeQueryOptionExpression.cs
- CqlIdentifiers.cs
- XmlRawWriterWrapper.cs
- SqlRemoveConstantOrderBy.cs
- CacheOutputQuery.cs
- SynchronizedDispatch.cs
- MenuTracker.cs
- EntityDataSourceQueryBuilder.cs
- DataGridViewImageColumn.cs
- DataDesignUtil.cs
- DifferencingCollection.cs
- NameNode.cs
- ExceptionUtil.cs
- SqlDependency.cs
- RegexFCD.cs
- DeviceContext2.cs
- WinFormsSpinner.cs
- EndpointFilterProvider.cs