You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -0,0 +1,78 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="DataTablePropertyDescriptor.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <owner current="true" primary="true">[....]</owner>
|
||||
// <owner current="true" primary="false">[....]</owner>
|
||||
// <owner current="false" primary="false">[....]</owner>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user