コード例 #1
0
        public static async Task InitializeRandomAsync(this ITypeTemplate template, Authentication authentication)
        {
            var typeName = RandomUtility.NextIdentifier();
            await template.SetTypeNameAsync(authentication, typeName);

            if (RandomUtility.Within(50) == true)
            {
                await template.SetIsFlagAsync(authentication, RandomUtility.NextBoolean());
            }
            if (RandomUtility.Within(50) == true)
            {
                await template.SetCommentAsync(authentication, RandomUtility.NextString());
            }
            await template.AddRandomMembersAsync(authentication);
        }