Example #1
0
        public static async Task <byte[]> CreateThumbnail(byte[] image)
        {
            // Parameter prüfen
            if (image == null)
            {
                throw new ArgumentNullException(nameof(image));
            }

            byte[] result = await WebRequester.HttpPost <byte[], byte[]>(
                serviceBaseUrl,
                "/thumbnail",
                image);

            return(result);
        }
Example #2
0
        public static async Task <int> CreateBeleg(string user, Beleg beleg)
        {
            // Parameter prüfen
            if (string.IsNullOrWhiteSpace(user))
            {
                throw new ArgumentNullException(nameof(user));
            }
            if (beleg == null)
            {
                throw new ArgumentNullException(nameof(beleg));
            }

            int result = await WebRequester.HttpPost <Beleg, IntReturn>(
                serviceBaseUrl,
                string.Format("/{0}", user),
                beleg).ContinueWith((t) => t.Result.Value.Value);

            return(result);
        }