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
- SqlWriter.cs
- AvTraceDetails.cs
- CustomErrorsSectionWrapper.cs
- CounterCreationDataCollection.cs
- TextEmbeddedObject.cs
- SqlUtils.cs
- ParentUndoUnit.cs
- ModelFunction.cs
- GenericAuthenticationEventArgs.cs
- EntityDataReader.cs
- followingquery.cs
- PrivacyNoticeElement.cs
- DragEventArgs.cs
- DiscriminatorMap.cs
- Span.cs
- EntityDataSourceWrapperCollection.cs
- TextTreeTextBlock.cs
- IncrementalCompileAnalyzer.cs
- FormViewRow.cs
- Model3D.cs
- EventSource.cs
- Helper.cs
- VirtualPathData.cs
- HexParser.cs
- RightNameExpirationInfoPair.cs
- PublisherMembershipCondition.cs
- DateTimeSerializationSection.cs
- MobileContainerDesigner.cs
- DataControlFieldCollection.cs
- XamlSerializer.cs
- Transform.cs
- BuildTopDownAttribute.cs
- ContextMenuStrip.cs
- ObjectStateFormatter.cs
- SQLStringStorage.cs
- KeyEvent.cs
- XPathQilFactory.cs
- BStrWrapper.cs
- TrackingMemoryStream.cs
- InspectionWorker.cs
- ServicePoint.cs
- ConfigurationElementProperty.cs
- xsdvalidator.cs
- WebConfigurationFileMap.cs
- xdrvalidator.cs
- ConditionCollection.cs
- TickBar.cs
- XmlFormatReaderGenerator.cs
- sqlnorm.cs
- StretchValidation.cs
- PageWrapper.cs
- TableItemPatternIdentifiers.cs
- DataControlPagerLinkButton.cs
- FamilyMapCollection.cs
- HotCommands.cs
- SafeEventHandle.cs
- DeferredTextReference.cs
- WebPartDescriptionCollection.cs
- CodeTypeOfExpression.cs
- IndexingContentUnit.cs
- SignedXml.cs
- ClientConfigurationHost.cs
- FullTextLine.cs
- GridViewRowPresenter.cs
- DummyDataSource.cs
- CompressionTransform.cs
- ProcessManager.cs
- WebBrowserSiteBase.cs
- SchemaObjectWriter.cs
- GroupQuery.cs
- ContractMapping.cs
- XPathNode.cs
- TextBoxBase.cs
- TreeViewItem.cs
- Pkcs7Recipient.cs
- ReadOnlyCollectionBase.cs
- SSmlParser.cs
- ETagAttribute.cs
- GreaterThan.cs
- PersistenceTypeAttribute.cs
- SByteStorage.cs
- CurrencyManager.cs
- SR.cs
- ManualResetEvent.cs
- ContentAlignmentEditor.cs
- MailHeaderInfo.cs
- HttpRuntimeSection.cs
- MenuItem.cs
- ValuePatternIdentifiers.cs
- TextElementCollection.cs
- CroppedBitmap.cs
- UserMapPath.cs
- InputReport.cs
- FontSizeConverter.cs
- JsonWriterDelegator.cs
- ClassValidator.cs
- SchemaCollectionPreprocessor.cs
- DifferencingCollection.cs
- IERequestCache.cs
- OrderByLifter.cs