Example #1
0
        public static async void Run()
        {
            Debug.WriteLine("******************************");
            Debug.WriteLine(MethodBase.GetCurrentMethod().Name);
            Debug.WriteLine("******************************");

            //  1.  Construct the document
            var deliveryInstruction = TS4905Builder.BuildDeliveryInstruction(22, 23);

            using (var stream = new MemoryStream())
            {
                using (var writer = new VdaWriter(stream, Environment.NewLine))
                {
                    //  2. Write it out
                    await writer.WriteAsync(deliveryInstruction);
                }

                Debug.Write(stream.LoadToString());
            }
        }
Example #2
0
        public static void Run()
        {
            Debug.WriteLine("******************************");
            Debug.WriteLine(MethodBase.GetCurrentMethod().Name);
            Debug.WriteLine("******************************");

            //  1.  Construct the first document
            var deliveryInstruction1 = TS4905Builder.BuildDeliveryInstruction(22, 23);

            //  2.  Construct the second document
            var deliveryInstruction2 = TS4905Builder.BuildDeliveryInstruction(23, 24);

            using (var stream = new MemoryStream())
            {
                using (var writer = new VdaWriter(stream, Environment.NewLine))
                {
                    //  3. Write them out
                    writer.Write(deliveryInstruction1);
                    writer.Write(deliveryInstruction2);
                }

                Debug.Write(stream.LoadToString());
            }
        }