Esempio n. 1
0
 public static void SetRandomComment(this ITypeMember typeMember, Authentication authentication)
 {
     if (RandomUtility.Within(50) == true)
     {
         typeMember.SetComment(authentication, RandomUtility.NextString());
     }
     else
     {
         typeMember.SetComment(authentication, string.Empty);
     }
 }
Esempio n. 2
0
 public void SetComment(ITypeMember member, TaskContext context)
 {
     member.Dispatcher.Invoke(() =>
     {
         var comment = RandomUtility.NextString();
         member.SetComment(context.Authentication, comment);
     });
 }
Esempio n. 3
0
        public static void InitializeRandom(this ITypeMember typeMember, Authentication authentication)
        {
            if (typeMember.Template.IsFlag == true)
            {
                typeMember.SetValue(authentication, RandomUtility.NextBit());
            }
            else if (RandomUtility.Within(95) == true)
            {
                typeMember.SetValue(authentication, (long)typeMember.Template.Count);
            }
            else
            {
                typeMember.SetValue(authentication, RandomUtility.NextLong(long.MaxValue));
            }

            if (RandomUtility.Within(50) == true)
            {
                typeMember.SetComment(authentication, RandomUtility.NextString());
            }
        }
 public void SetComment()
 {
     member.SetComment(authentication, RandomUtility.NextString());
 }