public GroupUpdate(int groupId, string fieldName, byte fieldType, object value, object oldValue, GroupUpdateType updateType) { this.groupId = groupId; this.fieldName = fieldName; this.fieldType = fieldType; this.value = value; this.oldValue = oldValue; this.updateType = updateType; }
/// <summary> /// Builds a new group update message. /// </summary> /// <param name="type">The update type.</param> /// <param name="data">The data to send.</param> /// <value>The GroupUpdate.</value> private GroupUpdate <T> NewSyncPlayGroupUpdate <T>(GroupUpdateType type, T data) { return(new GroupUpdate <T>() { GroupId = _group.GroupId.ToString(), Type = type, Data = data }); }
public GroupUpdate(int groupId, string fieldName, byte fieldType, object value, object oldValue, GroupUpdateType updateType) { GroupId = groupId; FieldName = fieldName; FieldType = fieldType; Value = value; OldValue = oldValue; UpdateType = updateType; }
public GroupUpdate(int groupId, string fieldName, byte fieldType, object value, object oldValue, GroupUpdateType updateType) { this.GroupId = groupId; this.FieldName = fieldName; this.FieldType = fieldType; this.Value = value; this.OldValue = oldValue; this.UpdateType = updateType; }
public LongpollGroupUpdateEventHandler(GroupUpdateType eventType, Func <T, Action, Task> handler) : base(handler) { this.eventType = eventType; eventFieldName = typeof(GroupUpdateType) .GetFields() .Where(prop => prop.GetValue(null).ToString() == eventType.ToString()) .Select(prop => prop?.Name) .FirstOrDefault(); }
public void On <T>(GroupUpdateType eventType, Func <T, Task> handler) => On <T>(eventType, (context, next) => handler(context));
public void On <T>(GroupUpdateType eventType, Func <T, Action, Task> handler) => events.Use(new LongpollGroupUpdateEventHandler <T>(eventType, handler));
/// <summary> /// Initializes a new instance of the <see cref="GroupUpdate{T}"/> class. /// </summary> /// <param name="groupId">The group identifier.</param> /// <param name="type">The update type.</param> /// <param name="data">The update data.</param> public GroupUpdate(Guid groupId, GroupUpdateType type, T data) { GroupId = groupId; Type = type; Data = data; }