Beispiel #1
0
        public static bool ChangeColumn(this ITableTemplate template, Authentication authentication)
        {
            var column = template.RandomOrDefault();

            if (column == null)
            {
                return(false);
            }

            if (RandomUtility.Within(25) == true)
            {
                column.SetName(authentication, RandomUtility.NextIdentifier());
            }

            if (RandomUtility.Within(75) == true)
            {
                column.SetTags(authentication, TagInfo.All);
            }
            else
            {
                column.SetTags(authentication, tags.Random());
            }

            if (RandomUtility.Within(25) == true)
            {
                column.SetComment(authentication, RandomUtility.NextString());
            }

            return(true);
        }
Beispiel #2
0
        public static bool DeleteColumn(this ITableTemplate template, Authentication authentication)
        {
            var column = template.RandomOrDefault();

            if (column == null || column.IsKey == true)
            {
                return(false);
            }

            try
            {
                column.Delete(authentication);
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Beispiel #3
0
        public static async Task <bool> DeleteColumnAsync(this ITableTemplate template, Authentication authentication)
        {
            var column = template.RandomOrDefault();

            if (column == null || column.IsKey == true)
            {
                return(false);
            }

            try
            {
                await column.DeleteAsync(authentication);
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Beispiel #4
0
 public static async Task ModifyRandomColumnAsync(this ITableTemplate template, Authentication authentication)
 {
     var column = template.RandomOrDefault();
     await column?.ModifyRandomValueAsync(authentication);
 }
Beispiel #5
0
 public static async Task RemoveRandomColumnAsync(this ITableTemplate template, Authentication authentication)
 {
     var column = template.RandomOrDefault();
     await column?.DeleteAsync(authentication);
 }
        public static void ModifyRandomColumn(this ITableTemplate template, Authentication authentication)
        {
            var column = template.RandomOrDefault();

            column?.ModifyRandomValue(authentication);
        }
        public static void RemoveRandomColumn(this ITableTemplate template, Authentication authentication)
        {
            var column = template.RandomOrDefault();

            column?.Delete(authentication);
        }