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); } }
public void SetComment(ITypeMember member, TaskContext context) { member.Dispatcher.Invoke(() => { var comment = RandomUtility.NextString(); member.SetComment(context.Authentication, comment); }); }
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()); }