public static void ChangeRow(this ITableContent content, Authentication authentication) { var table = content.Table; var row = content.RandomOrDefault(); if (row == null) { return; } var types = table.GetService(typeof(ITypeCollection)) as ITypeCollection; if (RandomUtility.Within(5) == true) { row.SetTags(authentication, tags.Random()); } else if (RandomUtility.Within(5) == true) { row.SetIsEnabled(authentication, RandomUtility.NextBoolean()); } else { var columnInfo = table.TableInfo.Columns.Random(); //row.SetField(authentication, columnInfo.Name, TypeContextExtensions.GetRandomValue(types, columnInfo)); } }
public static void DeleteRow(this ITableContent content, Authentication authentication) { var row = content.RandomOrDefault(); if (row == null) { return; } row.Delete(authentication); }
public static async Task DeleteRowAsync(this ITableContent content, Authentication authentication) { var row = content.RandomOrDefault(); if (row == null) { return; } await row.DeleteAsync(authentication); }
public static async Task ModifyRandomRowAsync(this ITableContent content, Authentication authentication) { var row = content.RandomOrDefault(); await row?.SetRandomValueAsync(authentication); }
public static async Task RemoveRandomRowAsync(this ITableContent content, Authentication authentication) { var row = content.RandomOrDefault(); await row?.DeleteAsync(authentication); }
public static void ModifyRandomRow(this ITableContent content, Authentication authentication) { var row = content.RandomOrDefault(); row?.SetRandomValue(authentication); }
public static void RemoveRandomRow(this ITableContent content, Authentication authentication) { var row = content.RandomOrDefault(); row?.Delete(authentication); }