private static void RegisterDataTypes(DatabaseService ds) { ds.AddFieldDescriptor("username", new FieldDescriptor { DataType = typeof(string), MinLength = 5, MaxLength = 30 }); ds.AddFieldDescriptor("nickname", new FieldDescriptor { DataType = typeof(string), MinLength = 5, MaxLength = 30 }); ds.AddFieldDescriptor("password", new FieldDescriptor { DataType = typeof(string), MinLength = 8, MaxLength = 30 }); ds.AddFieldDescriptor("role", new FieldDescriptor { DataType = typeof(string), MinLength = 8, MaxLength = 30 }); ds.AddFieldDescriptor("timestamp", new FieldDescriptor { DataType = typeof(DateTime), MinLength = 8, MaxLength = 30 }); ds.AddFieldDescriptor("message", new FieldDescriptor { DataType = typeof(string), MinLength = 0, MaxLength = 16000 }); ds.AddFieldDescriptor("destination", new FieldDescriptor { DataType = typeof(string), MinLength = 10, MaxLength = 10 }); ds.AddFieldDescriptor("messagetype", new FieldDescriptor { DataType = typeof(string), MinLength = 10, MaxLength = 10 }); }