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
- WbemException.cs
- XmlIlVisitor.cs
- MetadataPropertyvalue.cs
- StronglyTypedResourceBuilder.cs
- CellConstant.cs
- SQLBytesStorage.cs
- EnglishPluralizationService.cs
- ObjectStateManager.cs
- SafeWaitHandle.cs
- PagedDataSource.cs
- MarkupCompiler.cs
- FileLoadException.cs
- EntitySqlException.cs
- SettingsPropertyValue.cs
- ResXResourceWriter.cs
- ControlBuilder.cs
- TextChangedEventArgs.cs
- ToolStripHighContrastRenderer.cs
- PassportAuthenticationEventArgs.cs
- TransformDescriptor.cs
- PathNode.cs
- PrinterUnitConvert.cs
- PointF.cs
- Gdiplus.cs
- PlainXmlWriter.cs
- XPathScanner.cs
- UnicodeEncoding.cs
- IntegerValidator.cs
- ExeConfigurationFileMap.cs
- EnumBuilder.cs
- AssemblyCache.cs
- ElapsedEventArgs.cs
- RuleAttributes.cs
- TypeGeneratedEventArgs.cs
- DelegatingConfigHost.cs
- TypeBuilder.cs
- ProviderIncompatibleException.cs
- StaticContext.cs
- MarshalByValueComponent.cs
- OleDbCommand.cs
- SynchronizedDispatch.cs
- PermissionToken.cs
- WindowsScrollBar.cs
- ContentElementAutomationPeer.cs
- ListViewInsertEventArgs.cs
- XamlInt32CollectionSerializer.cs
- RemoteWebConfigurationHost.cs
- TemplateControlParser.cs
- DocumentStream.cs
- InternalResources.cs
- XmlRawWriter.cs
- HostingEnvironment.cs
- WrapPanel.cs
- Random.cs
- XmlSiteMapProvider.cs
- TripleDES.cs
- WrapPanel.cs
- ObjectStateEntry.cs
- HitTestParameters.cs
- DispatcherEventArgs.cs
- Serializer.cs
- HandlerMappingMemo.cs
- BitmapEncoder.cs
- FlowDocumentView.cs
- TypeSystem.cs
- ListViewItemSelectionChangedEvent.cs
- SqlNodeAnnotation.cs
- SurrogateDataContract.cs
- JsonFormatWriterGenerator.cs
- PassportAuthentication.cs
- SystemBrushes.cs
- PreservationFileReader.cs
- EndpointConfigContainer.cs
- SQLChars.cs
- DataColumnMapping.cs
- SafeCryptoHandles.cs
- SimpleTypeResolver.cs
- Attachment.cs
- TypeAccessException.cs
- SHA384Managed.cs
- DataGridCommandEventArgs.cs
- ApplicationServiceManager.cs
- ValidationPropertyAttribute.cs
- MailBnfHelper.cs
- SqlNotificationRequest.cs
- TemplateBindingExtension.cs
- BamlRecordHelper.cs
- RepeatBehavior.cs
- SoapInteropTypes.cs
- ControlPropertyNameConverter.cs
- QilLiteral.cs
- ConfigPathUtility.cs
- COM2Enum.cs
- DoubleUtil.cs
- PrintDialog.cs
- Tuple.cs
- CollectionView.cs
- MtomMessageEncodingElement.cs
- ExternalFile.cs
- ViewPort3D.cs