GetType() публичный статический Метод

public static GetType ( Type type ) : string
type System.Type
Результат string
Пример #1
0
 void CheckProperty(Type type, DbColumn column)
 {
     if (!Connection.ColumnExists(TableName, column.Name))
     {
         AddColumnToTable(SqliteUtils.BuildColumnSchema(
                              SqliteUtils.GetType(type),
                              column.Name, column.DefaultValue, column.Constraints));
     }
 }
Пример #2
0
 private AbstractDatabaseColumn(AbstractDatabaseColumnAttribute attribute, MemberInfo member_info, Type type)
 {
     try {
         column_type = SqliteUtils.GetType(type);
     } catch (Exception e) {
         throw new Exception(string.Format(
                                 "{0}.{1}: {2}", member_info.DeclaringType, member_info.Name, e.Message));
     }
     this.name = attribute.ColumnName ?? member_info.Name;
     this.type = type;
 }
Пример #3
0
 public void ClearProperty <U> (DbColumn column)
 {
     if (!Connection.ColumnExists(TableName, column.Name))
     {
         AddColumnToTable(SqliteUtils.BuildColumnSchema(
                              SqliteUtils.GetType(typeof(U)),
                              column.Name, column.DefaultValue, column.Constraints));
     }
     else
     {
         Connection.Execute(string.Format(
                                "UPDATE {0} SET {1}='{2}'",
                                TableName, column.Name, column.DefaultValue));
     }
 }