Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- HierarchicalDataSourceDesigner.cs
- DataShape.cs
- ListDictionaryInternal.cs
- HtmlButton.cs
- Renderer.cs
- FileBasedResourceGroveler.cs
- MemberMaps.cs
- AlignmentYValidation.cs
- OdbcDataReader.cs
- XPathSelfQuery.cs
- DrawingContextWalker.cs
- unsafenativemethodsother.cs
- StrokeCollectionConverter.cs
- SettingsPropertyIsReadOnlyException.cs
- StaticSiteMapProvider.cs
- XmlILAnnotation.cs
- DynamicDiscoveryDocument.cs
- SectionRecord.cs
- UserControlParser.cs
- SpeechEvent.cs
- DbLambda.cs
- SafeRightsManagementPubHandle.cs
- HtmlShim.cs
- EdmConstants.cs
- WinCategoryAttribute.cs
- PageScaling.cs
- XmlArrayItemAttributes.cs
- HtmlButton.cs
- NativeWindow.cs
- SpellerHighlightLayer.cs
- Exceptions.cs
- MobileCategoryAttribute.cs
- DNS.cs
- ToolStripDropDownClosingEventArgs.cs
- ButtonRenderer.cs
- RegexMatch.cs
- KnownBoxes.cs
- SqlDataSourceSummaryPanel.cs
- PartBasedPackageProperties.cs
- HttpException.cs
- StyleHelper.cs
- FilterException.cs
- PersonalizableTypeEntry.cs
- RealizedColumnsBlock.cs
- FieldReference.cs
- WebPartMinimizeVerb.cs
- MenuBindingsEditor.cs
- ThemeableAttribute.cs
- Adorner.cs
- Button.cs
- WindowsGraphics2.cs
- Brush.cs
- WindowPattern.cs
- OleDbTransaction.cs
- Vector3DAnimation.cs
- FontUnit.cs
- XmlSchemaAll.cs
- StorageTypeMapping.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- DataGridItemEventArgs.cs
- VariableBinder.cs
- ExpandSegmentCollection.cs
- SystemColors.cs
- ButtonColumn.cs
- ExpressionPrinter.cs
- TextBoxLine.cs
- UpdatePanelControlTrigger.cs
- SecurityTokenSerializer.cs
- ClientCultureInfo.cs
- LinkConverter.cs
- SchemaAttDef.cs
- DataBindingCollection.cs
- TextSelectionHighlightLayer.cs
- ElementInit.cs
- FileUtil.cs
- AgileSafeNativeMemoryHandle.cs
- FontInfo.cs
- MethodSignatureGenerator.cs
- ScrollEventArgs.cs
- XmlRawWriter.cs
- UniqueConstraint.cs
- InputProcessorProfilesLoader.cs
- SolidBrush.cs
- Wizard.cs
- sqlinternaltransaction.cs
- Style.cs
- _ProxyChain.cs
- MultidimensionalArrayItemReference.cs
- DataRelationPropertyDescriptor.cs
- TransformedBitmap.cs
- SystemTcpConnection.cs
- ExpandCollapseIsCheckedConverter.cs
- Scheduling.cs
- LayoutSettings.cs
- FileDialog.cs
- ResourceDisplayNameAttribute.cs
- TopClause.cs
- TextEndOfSegment.cs
- Empty.cs
- AccessViolationException.cs