Ejemplo n.º 1
0
        public override async Task WriteToStreamAsync(Type type, object value, Stream writeStream, HttpContent content,
                                                      TransportContext transportContext)
        {
            var label   = value as Label;
            var printer = new ZebraPrinter();

            label.Print(printer);
            var printedLabel = printer.ToString();
            await writeStream.WriteAsync(Encoding.UTF8.GetBytes(printedLabel), 0, printedLabel.Length);
        }