Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ResourceSetExpression.cs
- Listbox.cs
- RequestCachePolicyConverter.cs
- CodeCatchClauseCollection.cs
- BamlRecordHelper.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- UIElementAutomationPeer.cs
- TemplateControlParser.cs
- RepeaterItemEventArgs.cs
- HttpFormatExtensions.cs
- XmlIgnoreAttribute.cs
- ValidationResult.cs
- FilterQuery.cs
- MetadataElement.cs
- RuleSettings.cs
- ContentType.cs
- XmlHierarchicalDataSourceView.cs
- Stroke.cs
- TreeIterator.cs
- Zone.cs
- ChooseAction.cs
- HttpServerUtilityBase.cs
- TextRenderingModeValidation.cs
- ToolStripKeyboardHandlingService.cs
- InternalBufferOverflowException.cs
- XmlSchemaDocumentation.cs
- DispatcherEventArgs.cs
- SQLConvert.cs
- SettingsSavedEventArgs.cs
- hwndwrapper.cs
- SqlDataSourceCache.cs
- _SingleItemRequestCache.cs
- ImageFormat.cs
- AmbientProperties.cs
- FramingFormat.cs
- DataServiceKeyAttribute.cs
- ToolboxItemFilterAttribute.cs
- ResourceDictionaryCollection.cs
- AlphabeticalEnumConverter.cs
- TreeNodeCollection.cs
- HostedNamedPipeTransportManager.cs
- DetailsViewUpdateEventArgs.cs
- Stack.cs
- RemotingHelper.cs
- TypeLoadException.cs
- XmlSchemaValidationException.cs
- WindowsAuthenticationModule.cs
- XmlLoader.cs
- CodeDefaultValueExpression.cs
- ProfileGroupSettingsCollection.cs
- PropertyValue.cs
- ISFClipboardData.cs
- MaskDescriptors.cs
- PriorityQueue.cs
- RewritingPass.cs
- XamlStream.cs
- DesignerLoader.cs
- DriveNotFoundException.cs
- SqlIdentifier.cs
- _AutoWebProxyScriptWrapper.cs
- DbParameterCollectionHelper.cs
- OletxVolatileEnlistment.cs
- DefaultTextStore.cs
- SoapEnumAttribute.cs
- Rect3D.cs
- ListViewDataItem.cs
- ErrorProvider.cs
- WCFServiceClientProxyGenerator.cs
- HashFinalRequest.cs
- ManagedWndProcTracker.cs
- SqlUdtInfo.cs
- QilFactory.cs
- VisualTreeHelper.cs
- ControlHelper.cs
- WorkflowQueuingService.cs
- HttpResponseInternalWrapper.cs
- WpfMemberInvoker.cs
- ExtenderProvidedPropertyAttribute.cs
- GcHandle.cs
- ApplicationException.cs
- TemplatedWizardStep.cs
- GridViewColumnCollection.cs
- IdentityValidationException.cs
- ArraySubsetEnumerator.cs
- WebPartChrome.cs
- SQLMembershipProvider.cs
- ProvideValueServiceProvider.cs
- WebServiceTypeData.cs
- AstNode.cs
- ExtenderControl.cs
- MetadataHelper.cs
- SymmetricSecurityBindingElement.cs
- RbTree.cs
- ImmutableCollection.cs
- XAMLParseException.cs
- SvcMapFileLoader.cs
- DbExpressionVisitor.cs
- MemberCollection.cs
- CodeTypeParameterCollection.cs
- DesignTimeVisibleAttribute.cs