Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Data / System / Data / DataTablePropertyDescriptor.cs / 1 / DataTablePropertyDescriptor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.ComponentModel; internal sealed class DataTablePropertyDescriptor : PropertyDescriptor { DataTable table; public DataTable Table { get { return table; } } internal DataTablePropertyDescriptor(DataTable dataTable) : base(dataTable.TableName, null) { this.table = dataTable; } 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 DataTablePropertyDescriptor) { DataTablePropertyDescriptor descriptor = (DataTablePropertyDescriptor) other; return(descriptor.Table == Table); } return false; } public override Int32 GetHashCode() { return Table.GetHashCode(); } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { DataViewManagerListItemTypeDescriptor dataViewManagerListItem = (DataViewManagerListItemTypeDescriptor) component; return dataViewManagerListItem.GetDataView(table); } 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. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.ComponentModel; internal sealed class DataTablePropertyDescriptor : PropertyDescriptor { DataTable table; public DataTable Table { get { return table; } } internal DataTablePropertyDescriptor(DataTable dataTable) : base(dataTable.TableName, null) { this.table = dataTable; } 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 DataTablePropertyDescriptor) { DataTablePropertyDescriptor descriptor = (DataTablePropertyDescriptor) other; return(descriptor.Table == Table); } return false; } public override Int32 GetHashCode() { return Table.GetHashCode(); } public override bool CanResetValue(object component) { return false; } public override object GetValue(object component) { DataViewManagerListItemTypeDescriptor dataViewManagerListItem = (DataViewManagerListItemTypeDescriptor) component; return dataViewManagerListItem.GetDataView(table); } 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AutomationTextAttribute.cs
- MatrixCamera.cs
- SafeNativeMethods.cs
- FileUpload.cs
- ListBindableAttribute.cs
- XmlSchemaExporter.cs
- ResizingMessageFilter.cs
- Deflater.cs
- InkPresenterAutomationPeer.cs
- ToolStripDropDown.cs
- ConnectAlgorithms.cs
- Geometry.cs
- PeerService.cs
- DocumentPaginator.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- BaseAddressElement.cs
- UxThemeWrapper.cs
- Profiler.cs
- XsdCachingReader.cs
- PolicyManager.cs
- TrustManagerPromptUI.cs
- AutomationPropertyInfo.cs
- VScrollProperties.cs
- OpenTypeLayoutCache.cs
- Utils.cs
- ApplicationServiceManager.cs
- NonSerializedAttribute.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- OpCodes.cs
- MetadataWorkspace.cs
- TabControlAutomationPeer.cs
- RegexGroupCollection.cs
- FormsAuthentication.cs
- XdrBuilder.cs
- ProgressBarRenderer.cs
- ComponentEditorPage.cs
- HuffmanTree.cs
- InvalidWMPVersionException.cs
- RuntimeCompatibilityAttribute.cs
- GridEntryCollection.cs
- EventLogHandle.cs
- DispatcherExceptionFilterEventArgs.cs
- SqlLiftWhereClauses.cs
- BaseCodePageEncoding.cs
- ListItemCollection.cs
- PriorityChain.cs
- Invariant.cs
- TitleStyle.cs
- CutCopyPasteHelper.cs
- LostFocusEventManager.cs
- DelegateTypeInfo.cs
- AssemblyResourceLoader.cs
- ColumnMapProcessor.cs
- InstanceLockLostException.cs
- DetailsViewPageEventArgs.cs
- IndependentlyAnimatedPropertyMetadata.cs
- OperationCanceledException.cs
- WebBrowserEvent.cs
- PageFunction.cs
- DecoratedNameAttribute.cs
- updatecommandorderer.cs
- DataGridAutoFormat.cs
- Rotation3DAnimationBase.cs
- FrameworkElementFactory.cs
- DataGridViewComponentPropertyGridSite.cs
- ValidationService.cs
- HttpBrowserCapabilitiesWrapper.cs
- WebPartMenu.cs
- MasterPageCodeDomTreeGenerator.cs
- MouseActionValueSerializer.cs
- SystemUdpStatistics.cs
- LogReservationCollection.cs
- RegionData.cs
- ControlBuilder.cs
- NamespaceQuery.cs
- RegexCaptureCollection.cs
- LinearKeyFrames.cs
- ServiceManagerHandle.cs
- TextModifier.cs
- XmlSchemaProviderAttribute.cs
- BufferBuilder.cs
- GacUtil.cs
- PropertyStore.cs
- TemplatedMailWebEventProvider.cs
- ItemCollection.cs
- HttpContext.cs
- RayMeshGeometry3DHitTestResult.cs
- SmtpFailedRecipientException.cs
- ViewManagerAttribute.cs
- Content.cs
- GlyphsSerializer.cs
- RelationshipEndMember.cs
- LinkTarget.cs
- InvalidDocumentContentsException.cs
- AssemblyCache.cs
- AmbientLight.cs
- ForeignConstraint.cs
- EventLogPermission.cs
- BitmapDownload.cs
- thaishape.cs