Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Data / System / Data / DataRelationPropertyDescriptor.cs / 1 / DataRelationPropertyDescriptor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System.ComponentModel; ////// internal sealed class DataRelationPropertyDescriptor : PropertyDescriptor { DataRelation relation; internal DataRelation Relation { get { return relation; } } internal DataRelationPropertyDescriptor(DataRelation dataRelation) : base(dataRelation.RelationName, null) { this.relation = dataRelation; } public override Type ComponentType { get { return typeof(DataRowView); } } public override bool IsReadOnly { get { return false; } } public override Type PropertyType { get { return typeof(IBindingList); } } public override bool Equals(object other) { if (other is DataRelationPropertyDescriptor) { DataRelationPropertyDescriptor descriptor = (DataRelationPropertyDescriptor) other; return(descriptor.Relation == Relation); } return false; } public override Int32 GetHashCode() { return Relation.GetHashCode(); } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { DataRowView dataRowView = (DataRowView) component; return dataRowView.CreateChildView(relation); } public override void ResetValue(object component) { } public override void SetValue(object component, object value) { } public override bool ShouldSerializeValue(object component) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System.ComponentModel; ////// internal sealed class DataRelationPropertyDescriptor : PropertyDescriptor { DataRelation relation; internal DataRelation Relation { get { return relation; } } internal DataRelationPropertyDescriptor(DataRelation dataRelation) : base(dataRelation.RelationName, null) { this.relation = dataRelation; } public override Type ComponentType { get { return typeof(DataRowView); } } public override bool IsReadOnly { get { return false; } } public override Type PropertyType { get { return typeof(IBindingList); } } public override bool Equals(object other) { if (other is DataRelationPropertyDescriptor) { DataRelationPropertyDescriptor descriptor = (DataRelationPropertyDescriptor) other; return(descriptor.Relation == Relation); } return false; } public override Int32 GetHashCode() { return Relation.GetHashCode(); } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { DataRowView dataRowView = (DataRowView) component; return dataRowView.CreateChildView(relation); } public override void ResetValue(object component) { } public override void SetValue(object component, object value) { } public override bool ShouldSerializeValue(object component) { return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpCachePolicyElement.cs
- CompilerError.cs
- DbDataRecord.cs
- QuarticEase.cs
- CodeAccessSecurityEngine.cs
- ProgressChangedEventArgs.cs
- GenericsNotImplementedException.cs
- SortExpressionBuilder.cs
- HtmlAnchor.cs
- CodeTypeParameter.cs
- MediaElementAutomationPeer.cs
- EventQueueState.cs
- WebPartDisplayModeCollection.cs
- BuildManager.cs
- DashStyles.cs
- XamlPointCollectionSerializer.cs
- AssemblyBuilder.cs
- shaperfactory.cs
- Transform3DCollection.cs
- Converter.cs
- PropertyDescriptorComparer.cs
- DesignerSelectionListAdapter.cs
- TrustLevel.cs
- SplineQuaternionKeyFrame.cs
- TransactedReceiveData.cs
- ZipIOExtraFieldZip64Element.cs
- HttpDictionary.cs
- ThreadStartException.cs
- RelationalExpressions.cs
- SpecialFolderEnumConverter.cs
- AspNetHostingPermission.cs
- InternalControlCollection.cs
- FontStyle.cs
- CoordinationService.cs
- HttpApplicationStateBase.cs
- BufferedGraphics.cs
- DataContractSet.cs
- ParagraphVisual.cs
- XmlQualifiedName.cs
- DrawingContext.cs
- FrameworkContentElementAutomationPeer.cs
- PageEventArgs.cs
- DataGridViewLinkCell.cs
- TextLine.cs
- MimeMultiPart.cs
- SiteMapProvider.cs
- XmlSchemaSimpleTypeUnion.cs
- XmlBinaryReader.cs
- FileLogRecordEnumerator.cs
- Point3DAnimation.cs
- SessionPageStatePersister.cs
- DefaultDiscoveryServiceExtension.cs
- StringStorage.cs
- PageThemeCodeDomTreeGenerator.cs
- ClockGroup.cs
- RangeValuePattern.cs
- ContainerFilterService.cs
- UnknownBitmapDecoder.cs
- _RequestCacheProtocol.cs
- DynamicPropertyHolder.cs
- XmlMembersMapping.cs
- ParserHooks.cs
- ClientApiGenerator.cs
- RelationshipType.cs
- PageCodeDomTreeGenerator.cs
- SR.Designer.cs
- DoWorkEventArgs.cs
- _NestedMultipleAsyncResult.cs
- ClientSettings.cs
- InputScopeConverter.cs
- CatalogPart.cs
- XmlCodeExporter.cs
- DataGridClipboardHelper.cs
- SafeSystemMetrics.cs
- ParameterSubsegment.cs
- ExpressionPrinter.cs
- PrintPreviewControl.cs
- DesignerUtils.cs
- CalloutQueueItem.cs
- SamlAudienceRestrictionCondition.cs
- DefaultBinder.cs
- DiscoveryClientChannelFactory.cs
- CharacterMetricsDictionary.cs
- CollectionChangedEventManager.cs
- XsltContext.cs
- SpecialTypeDataContract.cs
- Button.cs
- MatchNoneMessageFilter.cs
- TagPrefixInfo.cs
- WindowsScrollBar.cs
- XPathCompileException.cs
- InvalidCastException.cs
- DataRelationCollection.cs
- KnownBoxes.cs
- ParagraphResult.cs
- EnumType.cs
- FileLogRecordEnumerator.cs
- ObjectListTitleAttribute.cs
- ConnectionPointConverter.cs
- ContainerFilterService.cs