internal static ServerTextChannel CreateFromJson(ChannelJson json, [CanBeNull] object state) { return((ServerTextChannel)ChannelUtils.CreateFromJson(json, state) ?? throw new ArgumentOutOfRangeException(nameof(json), "Incorrect JSON type.")); }
internal DirectMessageTextChannel(ChannelJson json, ulong ogId) : base(json, ogId) { }
internal ServerTextChannel(ChannelJson json, ulong ogId) : base(json, ogId) { _oldPins = null; _opMutex = new SemaphoreSlim(1); }
public static void PopulateInstance(IChannel obj, ChannelJson json, [CanBeNull] object state) { Switch(json, state, (json2, state2) => TextChannel.Populate((TextChannel)obj, json2, state2), (json2, state2) => TextChannel.Populate((TextChannel)obj, json2, state2), (json2, state2) => ChannelCategory.Populate((ChannelCategory)obj, json2, state2)); }
public static void Switch(ChannelJson json, [CanBeNull] object state, Action <ChannelJson, object> serverText, Action <ChannelJson, object> directMessageText, Action <ChannelJson, object> serverCategory) { Switch(json, state, WrapAction(serverText), WrapAction(directMessageText), WrapAction(serverCategory)); }
public static T Switch <T>(ChannelJson json, [CanBeNull] object state, Func <ChannelJson, object, T> serverText, Func <ChannelJson, object, T> directMessageText, Func <ChannelJson, object, T> serverCategory) { return(Switch(json.type, state, json, serverText, directMessageText, serverCategory)); }
internal abstract void Populate(ChannelJson json, [CanBeNull] object state);
// Don't call these from outside derived classes internal static void Populate(TextChannel obj, ChannelJson json, [CanBeNull] object state) { obj.Populate(json, state); }