Пример #1
0
        public static Badge AwardGroupCustom(string groupUrl, string image, string title, string description = null)
        {
            BaseBadge badge = new BaseBadge
            {
                Image       = image,
                Title       = title,
                Description = description,
                IsAcquired  = true
            };

            return(badge.AwardGroup(groupUrl));
        }
Пример #2
0
        public static Badge AwardUserCustom(Guid userId, string image, string title, string description = null)
        {
            BaseBadge badge = new BaseBadge
            {
                Image       = image,
                Title       = title,
                Description = description,
                IsAcquired  = true
            };

            return(badge.AwardUser(userId));
        }
Пример #3
0
        public static Badge AwardUser <T>(Guid userId) where T : BaseBadge
        {
            BaseBadge badge = (BaseBadge)Activator.CreateInstance(typeof(T));

            return(badge.AwardUser(userId));
        }
Пример #4
0
        public static Badge AwardGroup <T>(string groupUrl) where T : BaseBadge
        {
            BaseBadge badge = (BaseBadge)Activator.CreateInstance(typeof(T));

            return(badge.AwardGroup(groupUrl));
        }