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
- WebAdminConfigurationHelper.cs
- DataListItem.cs
- ThreadExceptionEvent.cs
- ReadOnlyNameValueCollection.cs
- LifetimeServices.cs
- WeakReferenceList.cs
- HyperLinkField.cs
- ImportCatalogPart.cs
- RenderingEventArgs.cs
- SchemaCreator.cs
- FontNameConverter.cs
- DrawListViewSubItemEventArgs.cs
- Select.cs
- XPathBinder.cs
- CodeDomConfigurationHandler.cs
- Symbol.cs
- ImmutablePropertyDescriptorGridEntry.cs
- GB18030Encoding.cs
- COM2AboutBoxPropertyDescriptor.cs
- RbTree.cs
- InstallerTypeAttribute.cs
- DataGridViewDataConnection.cs
- CacheSection.cs
- storepermission.cs
- MouseEvent.cs
- TableProvider.cs
- OleDbStruct.cs
- RSACryptoServiceProvider.cs
- ColorTransform.cs
- CqlLexer.cs
- RuntimeArgumentHandle.cs
- HelpKeywordAttribute.cs
- CharEnumerator.cs
- OdbcException.cs
- ToolStripProgressBar.cs
- QfeChecker.cs
- DependsOnAttribute.cs
- XmlDocument.cs
- ListItemCollection.cs
- HScrollProperties.cs
- LogicalMethodInfo.cs
- DataBindingExpressionBuilder.cs
- ListControl.cs
- SmtpNtlmAuthenticationModule.cs
- RawMouseInputReport.cs
- ToolboxItemAttribute.cs
- FileAuthorizationModule.cs
- ConfigurationSectionGroupCollection.cs
- SmtpNegotiateAuthenticationModule.cs
- Guid.cs
- WebPartTransformerAttribute.cs
- Lease.cs
- WebServiceHost.cs
- UseLicense.cs
- EditorZoneBase.cs
- XmlSortKeyAccumulator.cs
- CallContext.cs
- NetworkCredential.cs
- CatalogPartCollection.cs
- StickyNote.cs
- ItemCheckedEvent.cs
- ProfilePropertySettingsCollection.cs
- InputScope.cs
- XmlSchemaObject.cs
- PreviewPageInfo.cs
- DBSqlParserTableCollection.cs
- StatusBar.cs
- ObjectTypeMapping.cs
- HandlerFactoryWrapper.cs
- SamlDelegatingWriter.cs
- MultiplexingFormatMapping.cs
- DynamicDataResources.Designer.cs
- CopyAttributesAction.cs
- LinearGradientBrush.cs
- DataContext.cs
- BidPrivateBase.cs
- DescriptionAttribute.cs
- UpDownEvent.cs
- HandleRef.cs
- DecoderNLS.cs
- ConfigXmlWhitespace.cs
- DeleteStoreRequest.cs
- TypeBuilder.cs
- CqlLexer.cs
- WebBrowserPermission.cs
- SRef.cs
- securitycriticaldataformultiplegetandset.cs
- PostBackTrigger.cs
- ConfigXmlReader.cs
- RootBuilder.cs
- BasicExpandProvider.cs
- WizardPanel.cs
- MouseDevice.cs
- Comparer.cs
- exports.cs
- XmlWrappingReader.cs
- MetadataArtifactLoaderComposite.cs
- OutputChannel.cs
- LinqDataSourceSelectEventArgs.cs
- SoapAttributeOverrides.cs