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 ReadOnlyMetadataCollection AssociationSetEnds
{
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 ReadOnlyMetadataCollection AssociationSetEnds
{
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
- WindowPatternIdentifiers.cs
- MouseDevice.cs
- WorkflowRequestContext.cs
- DataList.cs
- FontTypeConverter.cs
- XmlReflectionMember.cs
- PointAnimationUsingPath.cs
- NodeFunctions.cs
- HostingPreferredMapPath.cs
- CroppedBitmap.cs
- PlatformCulture.cs
- HMACSHA512.cs
- ProxyRpc.cs
- SqlWriter.cs
- DSASignatureFormatter.cs
- RayHitTestParameters.cs
- _NetworkingPerfCounters.cs
- EventMappingSettings.cs
- ShapeTypeface.cs
- ProbeMatchesApril2005.cs
- DesignerInterfaces.cs
- Graphics.cs
- AstNode.cs
- TableLayoutRowStyleCollection.cs
- RowType.cs
- HashMembershipCondition.cs
- SqlClientWrapperSmiStreamChars.cs
- HttpServerUtilityWrapper.cs
- ConditionalBranch.cs
- PlaceHolder.cs
- Rfc2898DeriveBytes.cs
- WSHttpBindingCollectionElement.cs
- InfoCardCryptoHelper.cs
- BindingElement.cs
- _PooledStream.cs
- StylesEditorDialog.cs
- TypeUsageBuilder.cs
- WorkflowInvoker.cs
- SqlWorkflowPersistenceService.cs
- DataGridViewComboBoxCell.cs
- UserControl.cs
- DataRelation.cs
- ITextView.cs
- UserUseLicenseDictionaryLoader.cs
- JobStaple.cs
- SqlSelectClauseBuilder.cs
- SinglePageViewer.cs
- ToolBarButtonClickEvent.cs
- ImageBrush.cs
- _SpnDictionary.cs
- FormsAuthentication.cs
- CodeSnippetTypeMember.cs
- Scripts.cs
- ListBindingHelper.cs
- RemotingServices.cs
- CustomError.cs
- WinHttpWebProxyFinder.cs
- CodeRegionDirective.cs
- TypefaceMetricsCache.cs
- EpmCustomContentDeSerializer.cs
- Int64AnimationBase.cs
- SqlConnectionHelper.cs
- PermissionSetTriple.cs
- MimeFormatExtensions.cs
- CheckBoxStandardAdapter.cs
- WebPartManager.cs
- OpenTypeLayoutCache.cs
- ChannelReliableSession.cs
- ContextItemManager.cs
- HttpModuleCollection.cs
- Rules.cs
- ObjectNavigationPropertyMapping.cs
- DllNotFoundException.cs
- ObjectItemAttributeAssemblyLoader.cs
- CreateParams.cs
- PlacementWorkspace.cs
- GACMembershipCondition.cs
- ControlPersister.cs
- HtmlDocument.cs
- MultipartContentParser.cs
- VisualBasic.cs
- UshortList2.cs
- XmlQueryRuntime.cs
- FontUnitConverter.cs
- AssociationEndMember.cs
- Transform3D.cs
- BackgroundWorker.cs
- QilTargetType.cs
- ArrayConverter.cs
- CalloutQueueItem.cs
- SystemWebSectionGroup.cs
- AttributeInfo.cs
- WindowsFormsHostAutomationPeer.cs
- MultilineStringConverter.cs
- DynamicMetaObjectBinder.cs
- SelectionListDesigner.cs
- TraceContext.cs
- ListManagerBindingsCollection.cs
- BamlBinaryWriter.cs
- PersonalizablePropertyEntry.cs