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 / 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
- ReadOnlyCollection.cs
- MSG.cs
- FunctionCommandText.cs
- PropertyChangingEventArgs.cs
- EncoderBestFitFallback.cs
- ButtonStandardAdapter.cs
- Cursor.cs
- TimeIntervalCollection.cs
- ToolStripItemEventArgs.cs
- Processor.cs
- PenThreadPool.cs
- BevelBitmapEffect.cs
- ConfigurationLocation.cs
- BrowserInteropHelper.cs
- TextSearch.cs
- ObjectToIdCache.cs
- InstanceDataCollectionCollection.cs
- HMACSHA384.cs
- EntityDesignerDataSourceView.cs
- InlineCategoriesDocument.cs
- ScaleTransform.cs
- x509store.cs
- ImageAnimator.cs
- CodeMemberField.cs
- AsyncSerializedWorker.cs
- RefExpr.cs
- DataColumnPropertyDescriptor.cs
- QuestionEventArgs.cs
- MemberPathMap.cs
- XmlConverter.cs
- MetadataProperty.cs
- SqlGatherProducedAliases.cs
- EntityDataSourceWrapperCollection.cs
- NullableLongAverageAggregationOperator.cs
- ControlType.cs
- LookupBindingPropertiesAttribute.cs
- SamlConditions.cs
- ListViewTableRow.cs
- CodeAccessSecurityEngine.cs
- PrivateFontCollection.cs
- DrawingImage.cs
- HandleRef.cs
- SmiMetaData.cs
- ResourceType.cs
- Matrix.cs
- StrokeSerializer.cs
- RadioButtonRenderer.cs
- ScrollItemPattern.cs
- Bezier.cs
- FixedSOMPageConstructor.cs
- Identity.cs
- DPAPIProtectedConfigurationProvider.cs
- GridItemPatternIdentifiers.cs
- PixelShader.cs
- PerformanceCounterLib.cs
- MappingSource.cs
- ThicknessAnimationBase.cs
- XmlComment.cs
- SiteMapNodeCollection.cs
- ApplicationTrust.cs
- HandlerElement.cs
- SymmetricCryptoHandle.cs
- PerformanceCounterPermission.cs
- CacheRequest.cs
- ResourceAssociationSetEnd.cs
- Parallel.cs
- WmlLabelAdapter.cs
- OutputCacheProfile.cs
- MenuItemBindingCollection.cs
- DbDeleteCommandTree.cs
- LoginView.cs
- JsonServiceDocumentSerializer.cs
- CheckBoxRenderer.cs
- FontFamily.cs
- FullTextLine.cs
- Calendar.cs
- Int32CollectionConverter.cs
- HttpHandlersSection.cs
- NodeFunctions.cs
- ToolStripManager.cs
- MenuItemCollection.cs
- QueueProcessor.cs
- SecureStringHasher.cs
- XsdDuration.cs
- ScrollBar.cs
- ResourceIDHelper.cs
- PropertyKey.cs
- followingsibling.cs
- X509ChainPolicy.cs
- ValidationSummaryDesigner.cs
- Not.cs
- DataProviderNameConverter.cs
- SafeSecurityHandles.cs
- Decoder.cs
- XmlUtf8RawTextWriter.cs
- MDIWindowDialog.cs
- EntityReference.cs
- LZCodec.cs
- AddDataControlFieldDialog.cs
- AssemblyContextControlItem.cs