Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ProcessThread.cs
- SmiContextFactory.cs
- CharUnicodeInfo.cs
- SizeIndependentAnimationStorage.cs
- CodeIndexerExpression.cs
- TrackBarDesigner.cs
- FontStretches.cs
- PersonalizationProvider.cs
- WindowsPrincipal.cs
- ExpressionEditorSheet.cs
- _SslState.cs
- FacetChecker.cs
- RSAProtectedConfigurationProvider.cs
- AppManager.cs
- Operand.cs
- ContentDesigner.cs
- KnownTypes.cs
- XmlSchemaFacet.cs
- QilReference.cs
- HtmlElementEventArgs.cs
- DataRowView.cs
- StreamWithDictionary.cs
- Table.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SHA1CryptoServiceProvider.cs
- Ipv6Element.cs
- Merger.cs
- InputBuffer.cs
- CommandID.cs
- XmlILOptimizerVisitor.cs
- WebAdminConfigurationHelper.cs
- PolyQuadraticBezierSegment.cs
- ScrollPatternIdentifiers.cs
- SecurityRuntime.cs
- StyleHelper.cs
- LiteralText.cs
- InvalidateEvent.cs
- TdsParser.cs
- SafeMarshalContext.cs
- base64Transforms.cs
- DynamicActionMessageFilter.cs
- AssemblyBuilderData.cs
- Cursor.cs
- SqlConnectionHelper.cs
- ArithmeticLiteral.cs
- InlineObject.cs
- StorageBasedPackageProperties.cs
- ThousandthOfEmRealPoints.cs
- TemplatePartAttribute.cs
- QuaternionKeyFrameCollection.cs
- SslStream.cs
- TrustManager.cs
- Size3D.cs
- ListViewInsertEventArgs.cs
- ClientRolePrincipal.cs
- TransformerTypeCollection.cs
- GroupDescription.cs
- XmlC14NWriter.cs
- IPPacketInformation.cs
- HwndStylusInputProvider.cs
- NamedPipeTransportManager.cs
- LinqDataView.cs
- OdbcCommand.cs
- LambdaCompiler.Statements.cs
- OdbcConnection.cs
- TimeoutException.cs
- MessageQueuePermission.cs
- ContractInstanceProvider.cs
- Manipulation.cs
- SHA512Managed.cs
- KeyMatchBuilder.cs
- LoginUtil.cs
- DataGridViewAccessibleObject.cs
- BamlResourceSerializer.cs
- TablePattern.cs
- FixedSOMPageConstructor.cs
- TextSpanModifier.cs
- Propagator.cs
- MessageQueuePermissionEntry.cs
- PreApplicationStartMethodAttribute.cs
- DocumentEventArgs.cs
- EntityTransaction.cs
- WebPartZoneBase.cs
- CommandManager.cs
- Classification.cs
- ObjectToIdCache.cs
- TextModifierScope.cs
- InstanceView.cs
- wgx_exports.cs
- IsolatedStorage.cs
- ConfigsHelper.cs
- CultureInfo.cs
- DataGridViewTextBoxEditingControl.cs
- DecimalAnimationBase.cs
- TypeContext.cs
- BaseProcessor.cs
- DataGridViewComboBoxColumn.cs
- SharedUtils.cs
- KeyTime.cs
- VectorValueSerializer.cs