Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / Providers / ResourceAssociationSetEnd.cs / 1305376 / ResourceAssociationSetEnd.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Describes an end point of a resource association set. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Providers { using System.Diagnostics; ////// Class to describe an end point of a resource association set. /// [DebuggerDisplay("ResourceAssociationSetEnd: {Name}: ({ResourceSet.Name}, {ResourceType.Name}, {ResourceProperty.Name})")] public sealed class ResourceAssociationSetEnd { #region Private Fields ////// Resource set for the association end. /// private readonly ResourceSet resourceSet; ////// Resource type for the association end. /// private readonly ResourceType resourceType; ////// Resource property for the association end. /// private readonly ResourceProperty resourceProperty; #endregion Private Fields #region Constructor ////// Constructs a ResourceAssociationEnd instance. /// /// Resource set of the association end. /// Resource type of the association end. /// Resource property of the association end. public ResourceAssociationSetEnd(ResourceSet resourceSet, ResourceType resourceType, ResourceProperty resourceProperty) { WebUtil.CheckArgumentNull(resourceSet, "resourceSet"); WebUtil.CheckArgumentNull(resourceType, "resourceType"); if (resourceProperty != null && (resourceType.TryResolvePropertyName(resourceProperty.Name) == null || resourceProperty.TypeKind != ResourceTypeKind.EntityType)) { throw new ArgumentException(Strings.ResourceAssociationSetEnd_ResourcePropertyMustBeNavigationPropertyOnResourceType); } if (!resourceSet.ResourceType.IsAssignableFrom(resourceType) && !resourceType.IsAssignableFrom(resourceSet.ResourceType)) { throw new ArgumentException(Strings.ResourceAssociationSetEnd_ResourceTypeMustBeAssignableToResourceSet); } this.resourceSet = resourceSet; this.resourceType = resourceType; // Note that for the TargetEnd, resourceProperty can be null. this.resourceProperty = resourceProperty; } #endregion Constructor #region Properties ////// Resource set for the association end. /// public ResourceSet ResourceSet { [DebuggerStepThrough] get { return this.resourceSet; } } ////// Resource type for the association end. /// public ResourceType ResourceType { [DebuggerStepThrough] get { return this.resourceType; } } ////// Resource property for the association end. /// public ResourceProperty ResourceProperty { [DebuggerStepThrough] get { return this.resourceProperty; } } #endregion Properties } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Describes an end point of a resource association set. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Providers { using System.Diagnostics; ////// Class to describe an end point of a resource association set. /// [DebuggerDisplay("ResourceAssociationSetEnd: {Name}: ({ResourceSet.Name}, {ResourceType.Name}, {ResourceProperty.Name})")] public sealed class ResourceAssociationSetEnd { #region Private Fields ////// Resource set for the association end. /// private readonly ResourceSet resourceSet; ////// Resource type for the association end. /// private readonly ResourceType resourceType; ////// Resource property for the association end. /// private readonly ResourceProperty resourceProperty; #endregion Private Fields #region Constructor ////// Constructs a ResourceAssociationEnd instance. /// /// Resource set of the association end. /// Resource type of the association end. /// Resource property of the association end. public ResourceAssociationSetEnd(ResourceSet resourceSet, ResourceType resourceType, ResourceProperty resourceProperty) { WebUtil.CheckArgumentNull(resourceSet, "resourceSet"); WebUtil.CheckArgumentNull(resourceType, "resourceType"); if (resourceProperty != null && (resourceType.TryResolvePropertyName(resourceProperty.Name) == null || resourceProperty.TypeKind != ResourceTypeKind.EntityType)) { throw new ArgumentException(Strings.ResourceAssociationSetEnd_ResourcePropertyMustBeNavigationPropertyOnResourceType); } if (!resourceSet.ResourceType.IsAssignableFrom(resourceType) && !resourceType.IsAssignableFrom(resourceSet.ResourceType)) { throw new ArgumentException(Strings.ResourceAssociationSetEnd_ResourceTypeMustBeAssignableToResourceSet); } this.resourceSet = resourceSet; this.resourceType = resourceType; // Note that for the TargetEnd, resourceProperty can be null. this.resourceProperty = resourceProperty; } #endregion Constructor #region Properties ////// Resource set for the association end. /// public ResourceSet ResourceSet { [DebuggerStepThrough] get { return this.resourceSet; } } ////// Resource type for the association end. /// public ResourceType ResourceType { [DebuggerStepThrough] get { return this.resourceType; } } ////// Resource property for the association end. /// public ResourceProperty ResourceProperty { [DebuggerStepThrough] get { return this.resourceProperty; } } #endregion Properties } } // 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
- AnnotationAuthorChangedEventArgs.cs
- OutputBuffer.cs
- JoinCqlBlock.cs
- FileSecurity.cs
- StoreContentChangedEventArgs.cs
- LocalBuilder.cs
- SqlBuffer.cs
- RawStylusInputCustomData.cs
- SiteMapPath.cs
- SocketElement.cs
- SafeViewOfFileHandle.cs
- ToolStrip.cs
- FastEncoder.cs
- FrugalMap.cs
- OuterProxyWrapper.cs
- GiveFeedbackEvent.cs
- CodeSnippetStatement.cs
- X509ChainElement.cs
- COM2EnumConverter.cs
- RtfNavigator.cs
- AuthenticationSection.cs
- SizeAnimationUsingKeyFrames.cs
- ComplusTypeValidator.cs
- ProfileGroupSettings.cs
- DbConnectionPoolCounters.cs
- PropertyValueUIItem.cs
- LastQueryOperator.cs
- EndpointAddressMessageFilterTable.cs
- GenerateTemporaryTargetAssembly.cs
- DockProviderWrapper.cs
- MetadataItem_Static.cs
- ForceCopyBuildProvider.cs
- RepeatButtonAutomationPeer.cs
- ConfigurationSectionGroupCollection.cs
- TransactionFlowAttribute.cs
- BitmapFrameEncode.cs
- AxHost.cs
- X509CertificateStore.cs
- SqlXml.cs
- DataGridRelationshipRow.cs
- DataPager.cs
- FeatureSupport.cs
- PaginationProgressEventArgs.cs
- WebPartConnectionsConnectVerb.cs
- KnownBoxes.cs
- ExceptionUtil.cs
- SHA512.cs
- future.cs
- SimpleExpression.cs
- FileReservationCollection.cs
- SecurityRuntime.cs
- DataBoundControlHelper.cs
- Marshal.cs
- DBCSCodePageEncoding.cs
- EntityTypeBase.cs
- InternalDuplexChannelListener.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- DbException.cs
- ToolStripContainer.cs
- TrackingServices.cs
- UnaryNode.cs
- FileStream.cs
- CodeNamespaceImportCollection.cs
- Vector3DAnimation.cs
- Helper.cs
- ObjectManager.cs
- ButtonRenderer.cs
- ServiceChannel.cs
- ManipulationPivot.cs
- WebPartConnectionsConfigureVerb.cs
- Parameter.cs
- Point3D.cs
- InfoCardXmlSerializer.cs
- BypassElement.cs
- ResourceDisplayNameAttribute.cs
- validation.cs
- GeneratedView.cs
- Helpers.cs
- IgnoreDeviceFilterElementCollection.cs
- documentsequencetextpointer.cs
- ThreadExceptionDialog.cs
- SystemResourceHost.cs
- UiaCoreApi.cs
- SqlDuplicator.cs
- ResourcePermissionBaseEntry.cs
- SafePipeHandle.cs
- FileUtil.cs
- WebBrowserProgressChangedEventHandler.cs
- TextOptions.cs
- WsdlServiceChannelBuilder.cs
- HandleExceptionArgs.cs
- PageCatalogPart.cs
- WaitHandleCannotBeOpenedException.cs
- PipelineModuleStepContainer.cs
- FixedBufferAttribute.cs
- EntitySqlQueryState.cs
- KeyConverter.cs
- ToolStripGrip.cs
- SafeNativeMethods.cs
- JsonObjectDataContract.cs