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
- Helper.cs
- EditorBrowsableAttribute.cs
- RegexCode.cs
- FixedLineResult.cs
- XmlNotation.cs
- NetworkCredential.cs
- CodeTypeReferenceCollection.cs
- MessageFault.cs
- DataControlReferenceCollection.cs
- SignedInfo.cs
- HtmlHead.cs
- NonSerializedAttribute.cs
- ProtocolsSection.cs
- ClientRoleProvider.cs
- DefaultValidator.cs
- AggregationMinMaxHelpers.cs
- RichTextBox.cs
- WebBrowserNavigatedEventHandler.cs
- SessionStateSection.cs
- Root.cs
- Compiler.cs
- StylusSystemGestureEventArgs.cs
- SelectionList.cs
- FlowDocumentScrollViewer.cs
- HtmlInputPassword.cs
- Persist.cs
- WebPartConnection.cs
- ProfileService.cs
- ExpressionDumper.cs
- WpfKnownMember.cs
- SystemParameters.cs
- X509ChainElement.cs
- PermissionAttributes.cs
- HostSecurityManager.cs
- XmlSchemaObjectCollection.cs
- EntityDataSourceWrapper.cs
- AvTraceFormat.cs
- EllipseGeometry.cs
- HttpModuleAction.cs
- PropertyKey.cs
- MessageEncoder.cs
- TypeDescriptionProvider.cs
- SchemaConstraints.cs
- ControlUtil.cs
- ProbeMatchesCD1.cs
- UseAttributeSetsAction.cs
- DbgUtil.cs
- ControlValuePropertyAttribute.cs
- TableLayoutSettingsTypeConverter.cs
- FamilyTypeface.cs
- IPEndPointCollection.cs
- SecurityChannel.cs
- CollectionTypeElement.cs
- SQLGuid.cs
- MSHTMLHost.cs
- LinqDataSourceUpdateEventArgs.cs
- ExpressionsCollectionEditor.cs
- WithStatement.cs
- PackagingUtilities.cs
- LineBreak.cs
- SelectionEditingBehavior.cs
- __Filters.cs
- ProviderIncompatibleException.cs
- cryptoapiTransform.cs
- ECDiffieHellmanCng.cs
- Propagator.cs
- MetadataSerializer.cs
- X500Name.cs
- SaveRecipientRequest.cs
- CalendarItem.cs
- RolePrincipal.cs
- UncommonField.cs
- DrawingDrawingContext.cs
- propertyentry.cs
- SettingsPropertyWrongTypeException.cs
- CollectionViewGroupInternal.cs
- GuidConverter.cs
- ClientSession.cs
- ConfigurationSchemaErrors.cs
- ReachPrintTicketSerializer.cs
- MailMessageEventArgs.cs
- XmlAttributes.cs
- EntityDataSourceColumn.cs
- DataGridViewCellFormattingEventArgs.cs
- ConfigsHelper.cs
- GetPageNumberCompletedEventArgs.cs
- TemplateAction.cs
- Timer.cs
- SqlTypeSystemProvider.cs
- WaitForChangedResult.cs
- DataServices.cs
- StringOutput.cs
- RawKeyboardInputReport.cs
- SequenceNumber.cs
- EntityDataSourceChangedEventArgs.cs
- DecimalStorage.cs
- XmlTextAttribute.cs
- Descriptor.cs
- BitStream.cs
- SHA512Managed.cs