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
- XmlWriterSettings.cs
- InstanceCreationEditor.cs
- SignedInfo.cs
- Dump.cs
- SecurityElement.cs
- ChangePasswordAutoFormat.cs
- ScriptReference.cs
- NameObjectCollectionBase.cs
- StackSpiller.Temps.cs
- AudienceUriMode.cs
- PathFigure.cs
- RightsManagementEncryptionTransform.cs
- ObjectPersistData.cs
- XmlWrappingReader.cs
- PolicyValidator.cs
- SettingsPropertyNotFoundException.cs
- ImageMetadata.cs
- ScaleTransform.cs
- DynamicResourceExtensionConverter.cs
- PropertyMapper.cs
- CacheForPrimitiveTypes.cs
- OptionalMessageQuery.cs
- CodeCommentStatementCollection.cs
- DynamicControl.cs
- GrabHandleGlyph.cs
- StylusDownEventArgs.cs
- RequestCacheEntry.cs
- PrintDialog.cs
- Schema.cs
- OuterGlowBitmapEffect.cs
- CompositeActivityValidator.cs
- InfoCardCryptoHelper.cs
- MergeFailedEvent.cs
- infer.cs
- StreamAsIStream.cs
- System.Data_BID.cs
- AssociationProvider.cs
- ColorContextHelper.cs
- SHA256Managed.cs
- DispatcherProcessingDisabled.cs
- KeyInstance.cs
- ConfigurationSectionHelper.cs
- LocationSectionRecord.cs
- AttachInfo.cs
- StringPropertyBuilder.cs
- PropertyReferenceSerializer.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ListContractAdapter.cs
- AppDomainUnloadedException.cs
- Processor.cs
- DbConnectionHelper.cs
- InputEventArgs.cs
- ExternalCalls.cs
- ViewRendering.cs
- RepeaterItem.cs
- RestClientProxyHandler.cs
- Floater.cs
- MSAAEventDispatcher.cs
- CodeSubDirectoriesCollection.cs
- BreadCrumbTextConverter.cs
- BamlLocalizer.cs
- DbLambda.cs
- ScriptResourceMapping.cs
- FormatStringEditor.cs
- AbsoluteQuery.cs
- Comparer.cs
- ScriptReference.cs
- PeerSecurityHelpers.cs
- PlatformCulture.cs
- FixedHighlight.cs
- QuaternionAnimationBase.cs
- UnhandledExceptionEventArgs.cs
- DataServiceQueryException.cs
- Visual3D.cs
- WindowInteropHelper.cs
- PreDigestedSignedInfo.cs
- Utils.cs
- MissingSatelliteAssemblyException.cs
- DataGridViewButtonColumn.cs
- EntityStoreSchemaFilterEntry.cs
- CodeExpressionRuleDeclaration.cs
- WebColorConverter.cs
- MessageQueueKey.cs
- UseAttributeSetsAction.cs
- PhysicalOps.cs
- base64Transforms.cs
- VScrollBar.cs
- ParseChildrenAsPropertiesAttribute.cs
- ProfileEventArgs.cs
- SourceFileBuildProvider.cs
- StreamGeometry.cs
- ColumnTypeConverter.cs
- DataTemplateSelector.cs
- ImagingCache.cs
- CodeMethodReturnStatement.cs
- RtfToken.cs
- ResourceProviderFactory.cs
- SqlGatherProducedAliases.cs
- StylusPlugin.cs
- ISAPIWorkerRequest.cs