Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / DataTablePropertyDescriptor.cs / 1305376 / 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
- XmlObjectSerializerReadContextComplex.cs
- FileController.cs
- HostingEnvironment.cs
- DefaultShape.cs
- CroppedBitmap.cs
- WinEventQueueItem.cs
- HandlerElement.cs
- TrustLevel.cs
- Int32CollectionConverter.cs
- SourceFilter.cs
- BindingNavigator.cs
- TrackingProvider.cs
- ContainerControl.cs
- SqlDataSourceTableQuery.cs
- ManagementDateTime.cs
- SystemSounds.cs
- XmlSchemaSimpleContent.cs
- TransformationRules.cs
- VerificationException.cs
- EnumerableValidator.cs
- SoapFormatterSinks.cs
- SvcMapFileLoader.cs
- contentDescriptor.cs
- TextRangeBase.cs
- UIPermission.cs
- RuntimeWrappedException.cs
- TraceUtility.cs
- cookieexception.cs
- FixUp.cs
- Drawing.cs
- PartialCachingAttribute.cs
- TextModifierScope.cs
- ControlPropertyNameConverter.cs
- ModelItem.cs
- DocumentViewer.cs
- DataGridViewComboBoxEditingControl.cs
- ScriptControl.cs
- MonthCalendarDesigner.cs
- NativeCompoundFileAPIs.cs
- RoutedUICommand.cs
- VisualStateChangedEventArgs.cs
- storepermissionattribute.cs
- PersonalizationDictionary.cs
- MethodSet.cs
- NullableConverter.cs
- TraceXPathNavigator.cs
- ComboBoxAutomationPeer.cs
- Animatable.cs
- TraceContextRecord.cs
- ResourceReferenceKeyNotFoundException.cs
- ActiveXContainer.cs
- DataGridViewCheckBoxColumn.cs
- ContextBase.cs
- PageThemeCodeDomTreeGenerator.cs
- StagingAreaInputItem.cs
- DataControlFieldCell.cs
- MessageSecurityOverMsmqElement.cs
- StandardOleMarshalObject.cs
- SqlPersistenceProviderFactory.cs
- XDRSchema.cs
- ConvertersCollection.cs
- RuleElement.cs
- documentsequencetextview.cs
- SyndicationElementExtensionCollection.cs
- ThreadInterruptedException.cs
- CacheRequest.cs
- ZipPackagePart.cs
- KeyNotFoundException.cs
- DataGridViewUtilities.cs
- ToolboxBitmapAttribute.cs
- RectAnimationBase.cs
- Input.cs
- BindableTemplateBuilder.cs
- SetterBaseCollection.cs
- CancelEventArgs.cs
- PlainXmlSerializer.cs
- CertificateReferenceElement.cs
- PointKeyFrameCollection.cs
- HtmlElement.cs
- FontStretchConverter.cs
- DuplexChannelFactory.cs
- ReferencedAssembly.cs
- DatagridviewDisplayedBandsData.cs
- Point3DIndependentAnimationStorage.cs
- SqlConnectionHelper.cs
- ErrorReporting.cs
- Helper.cs
- AxHost.cs
- DispatchWrapper.cs
- SqlUtils.cs
- MessageDesigner.cs
- TemplatedWizardStep.cs
- AttributeTable.cs
- ImageConverter.cs
- DataViewSettingCollection.cs
- Metafile.cs
- ExtractedStateEntry.cs
- RoleGroup.cs
- HttpException.cs
- SystemColorTracker.cs