Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / AssociationEndMember.cs / 1305376 / AssociationEndMember.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Data.Objects.DataClasses;
namespace System.Data.Metadata.Edm
{
///
/// Represents a end of a Association Type
///
public sealed class AssociationEndMember : RelationshipEndMember
{
#region Constructors
///
/// Initializes a new instance of AssociationEndMember
///
/// name of the association end member
/// Ref type that this end refers to
/// multiplicity of the end
internal AssociationEndMember(string name,
RefType endRefType,
RelationshipMultiplicity multiplicity)
: base(name, endRefType, multiplicity)
{
}
#endregion
///
/// Returns the kind of the type
///
public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.AssociationEndMember; } }
private Func _getRelatedEndMethod = null;
/// cached dynamic method to set a CLR property value on a CLR instance
internal Func GetRelatedEnd
{
get { return _getRelatedEndMethod; }
set
{
System.Diagnostics.Debug.Assert(null != value, "clearing GetRelatedEndMethod");
// It doesn't matter which delegate wins, but only one should be jitted
Interlocked.CompareExchange(ref _getRelatedEndMethod, value, null);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Data.Objects.DataClasses;
namespace System.Data.Metadata.Edm
{
///
/// Represents a end of a Association Type
///
public sealed class AssociationEndMember : RelationshipEndMember
{
#region Constructors
///
/// Initializes a new instance of AssociationEndMember
///
/// name of the association end member
/// Ref type that this end refers to
/// multiplicity of the end
internal AssociationEndMember(string name,
RefType endRefType,
RelationshipMultiplicity multiplicity)
: base(name, endRefType, multiplicity)
{
}
#endregion
///
/// Returns the kind of the type
///
public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.AssociationEndMember; } }
private Func _getRelatedEndMethod = null;
/// cached dynamic method to set a CLR property value on a CLR instance
internal Func GetRelatedEnd
{
get { return _getRelatedEndMethod; }
set
{
System.Diagnostics.Debug.Assert(null != value, "clearing GetRelatedEndMethod");
// It doesn't matter which delegate wins, but only one should be jitted
Interlocked.CompareExchange(ref _getRelatedEndMethod, value, null);
}
}
}
}
// 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
- AstTree.cs
- AsyncSerializedWorker.cs
- ConstrainedDataObject.cs
- FamilyMapCollection.cs
- MimeBasePart.cs
- Parameter.cs
- Pair.cs
- C14NUtil.cs
- WebRequest.cs
- PersonalizationStateInfoCollection.cs
- StructuralCache.cs
- State.cs
- RuntimeCompatibilityAttribute.cs
- XpsS0ValidatingLoader.cs
- Int32Collection.cs
- EventLogPermission.cs
- Stacktrace.cs
- ResourceAttributes.cs
- CustomAttributeBuilder.cs
- AxHostDesigner.cs
- TemplateDefinition.cs
- SemaphoreSlim.cs
- PageSetupDialog.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ObjectListDesigner.cs
- AffineTransform3D.cs
- SmtpCommands.cs
- RegexCharClass.cs
- StringUtil.cs
- Rectangle.cs
- ProfileSection.cs
- ProviderCommandInfoUtils.cs
- DataStreams.cs
- ModelItemDictionaryImpl.cs
- GridViewColumn.cs
- ClientTargetSection.cs
- SplitterPanel.cs
- TransactionState.cs
- Document.cs
- hwndwrapper.cs
- EndpointIdentity.cs
- GraphicsContext.cs
- ObjectPersistData.cs
- FileEnumerator.cs
- AlternateViewCollection.cs
- XmlDictionaryReaderQuotas.cs
- GeneralTransform2DTo3DTo2D.cs
- ListenerElementsCollection.cs
- ProtocolViolationException.cs
- EntityDataSourceDesigner.cs
- CalloutQueueItem.cs
- RSAOAEPKeyExchangeDeformatter.cs
- DelimitedListTraceListener.cs
- SQLString.cs
- SpellerHighlightLayer.cs
- CollectionBase.cs
- NegotiationTokenAuthenticatorState.cs
- WebPartZoneAutoFormat.cs
- TcpServerChannel.cs
- WizardPanelChangingEventArgs.cs
- WriteableBitmap.cs
- SqlCrossApplyToCrossJoin.cs
- NavigationProgressEventArgs.cs
- dbenumerator.cs
- InertiaExpansionBehavior.cs
- AssemblyBuilderData.cs
- SQLUtility.cs
- fixedPageContentExtractor.cs
- DependencyObject.cs
- SoapTypeAttribute.cs
- TileModeValidation.cs
- IdentitySection.cs
- LabelInfo.cs
- InheritanceAttribute.cs
- RuntimeHandles.cs
- DispatcherExceptionFilterEventArgs.cs
- DocumentPropertiesDialog.cs
- WebServiceErrorEvent.cs
- PrincipalPermission.cs
- TransformationRules.cs
- ProjectionAnalyzer.cs
- JpegBitmapDecoder.cs
- ImageCodecInfo.cs
- RuleElement.cs
- CodeDomConfigurationHandler.cs
- IQueryable.cs
- ServiceOperationUIEditor.cs
- __Filters.cs
- PropertiesTab.cs
- FormsAuthenticationCredentials.cs
- HtmlHead.cs
- DateTimeValueSerializer.cs
- Assert.cs
- X509Extension.cs
- WSDualHttpBindingCollectionElement.cs
- MetadataWorkspace.cs
- TimeZone.cs
- ProjectionCamera.cs
- PointIndependentAnimationStorage.cs
- CheckBoxBaseAdapter.cs