Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DataGridViewAddColumnDialog.cs
- DefaultTraceListener.cs
- WindowsTab.cs
- BamlMapTable.cs
- WebPartVerbsEventArgs.cs
- BrushValueSerializer.cs
- Script.cs
- XmlDeclaration.cs
- XmlChildNodes.cs
- RoutedCommand.cs
- Int16AnimationUsingKeyFrames.cs
- SessionStateUtil.cs
- Message.cs
- exports.cs
- SmiContext.cs
- ColorTransform.cs
- ViewEventArgs.cs
- FunctionUpdateCommand.cs
- XmlMemberMapping.cs
- BamlLocalizationDictionary.cs
- TailCallAnalyzer.cs
- ChtmlTextWriter.cs
- SolidBrush.cs
- SystemIPAddressInformation.cs
- RelationshipWrapper.cs
- OdbcConnection.cs
- AssemblySettingAttributes.cs
- ImageField.cs
- WCFBuildProvider.cs
- EmptyStringExpandableObjectConverter.cs
- XmlSchemaType.cs
- DropDownButton.cs
- CollectionChangedEventManager.cs
- EnumerableRowCollection.cs
- DataTableMappingCollection.cs
- WsdlExporter.cs
- PolicyException.cs
- MruCache.cs
- XmlQuerySequence.cs
- ItemAutomationPeer.cs
- ReflectionServiceProvider.cs
- CompoundFileStorageReference.cs
- DictionaryKeyPropertyAttribute.cs
- EventManager.cs
- UserMapPath.cs
- DataGridBoolColumn.cs
- PropertyPathConverter.cs
- CancelEventArgs.cs
- InvalidCastException.cs
- GridViewRowPresenterBase.cs
- RequestDescription.cs
- DbParameterHelper.cs
- DefaultBindingPropertyAttribute.cs
- AssemblyLoader.cs
- SQLInt64.cs
- RelationshipConverter.cs
- DateTimeAutomationPeer.cs
- OperationResponse.cs
- ZipIOLocalFileDataDescriptor.cs
- MemberDescriptor.cs
- Item.cs
- EntityExpressionVisitor.cs
- ExpressionBinding.cs
- XamlFigureLengthSerializer.cs
- HttpRequestTraceRecord.cs
- AttributeEmitter.cs
- MouseButtonEventArgs.cs
- SqlVersion.cs
- DataGridRow.cs
- WindowsSlider.cs
- Socket.cs
- AttributeCollection.cs
- NativeMethods.cs
- BrowsableAttribute.cs
- TypeRestriction.cs
- MarginsConverter.cs
- RightsManagementSuppressedStream.cs
- AspNetSynchronizationContext.cs
- DataStreamFromComStream.cs
- LoginUtil.cs
- UnauthorizedWebPart.cs
- CodeDOMUtility.cs
- TypeForwardedFromAttribute.cs
- Span.cs
- HttpModuleActionCollection.cs
- InvokeMethodActivityDesigner.cs
- PrivilegedConfigurationManager.cs
- ApplicationInterop.cs
- EpmContentSerializerBase.cs
- XmlSignificantWhitespace.cs
- DataControlCommands.cs
- SelectionItemPattern.cs
- Line.cs
- EvidenceTypeDescriptor.cs
- ZipIOFileItemStream.cs
- WebPartDisplayModeCollection.cs
- PenContexts.cs
- DataGridViewCheckBoxCell.cs
- templategroup.cs
- SynchronizedDispatch.cs