mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* MetaTableTest.cs: tests use single data model provider now. Implemented tests for IsReadOnly, ListActionPath, Model, Name, Provider, Scaffold, SortColumn, SortDescending, ToString. Fixed ForeignKeyColumnNames test. 2009-06-12 Marek Habersack <[email protected]> * TestDataContainer.cs: GetTables uses an object of the associated data type to create table collection. * TestDataColumn.cs: foreign key columns are determined using a custom attribute instead of a name now. This makes it possible to specify which table.column they are associated with. * FooDisplayColumnAttribute.cs: changed sortDescending to true in class attributes. * AssociatedBar.cs, AssociatedFoo.cs, FooEmptySortColumn.cs, FooMisnamedSortColumn.cs, FooNoScaffold.cs, FooReadOnly.cs, ITestDataContext.cs, TestDataContext.cs: added 2009-06-12 Marek Habersack <[email protected]> * MetaTable.cs: implemented correct detection of foreign key columns. Implemented IsReadOnly, SortColumn, SortDescending. svn path=/trunk/mcs/; revision=135997
27 lines
687 B
C#
27 lines
687 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace MonoTests.Common
|
|
{
|
|
// Parameters: display column, sort column, whether sort is descending
|
|
[DisplayColumn ("Column2", "Column1", true)]
|
|
class FooDisplayColumnAttribute
|
|
{
|
|
public string Column1 { get; set; }
|
|
public int Column2 { get; set; }
|
|
public string PrimaryKeyColumn1 { get; set; }
|
|
public int PrimaryKeyColumn2 { get; set; }
|
|
public bool PrimaryKeyColumn3 { get; set; }
|
|
|
|
public FooDisplayColumnAttribute ()
|
|
{
|
|
Column1 = "hello";
|
|
Column2 = 123;
|
|
PrimaryKeyColumn1 = "primary key value";
|
|
PrimaryKeyColumn2 = 456;
|
|
PrimaryKeyColumn3 = true;
|
|
}
|
|
}
|
|
}
|