Пример #1
0
        public async Task PublishAsync(string channel, string id, string previousId, HttpResponseFormat responseFormat = null, HttpStreamFormat streamFormat = null)
        {
            var item = new Item() { Id = id, PreviousId = previousId };

            if (responseFormat != null)
                item.Formats.Add(responseFormat);
            if (streamFormat != null)
                item.Formats.Add(streamFormat);

            await PublishAsync(channel, item);
        }
Пример #2
0
        public async Task PublishAsync(string channel, string id, string previousId, HttpResponseFormat responseFormat = null, HttpStreamFormat streamFormat = null)
        {
            var item = new Item()
            {
                Id = id, PreviousId = previousId
            };

            if (responseFormat != null)
            {
                item.Formats.Add(responseFormat);
            }
            if (streamFormat != null)
            {
                item.Formats.Add(streamFormat);
            }

            await PublishAsync(channel, item);
        }