Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
        public static void DeleteRow(this ITableContent content, Authentication authentication)
        {
            var row = content.RandomOrDefault();

            if (row == null)
            {
                return;
            }

            row.Delete(authentication);
        }
Exemplo n.º 3
0
        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);
 }
Exemplo n.º 6
0
        public static void ModifyRandomRow(this ITableContent content, Authentication authentication)
        {
            var row = content.RandomOrDefault();

            row?.SetRandomValue(authentication);
        }
Exemplo n.º 7
0
        public static void RemoveRandomRow(this ITableContent content, Authentication authentication)
        {
            var row = content.RandomOrDefault();

            row?.Delete(authentication);
        }