aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Embroidery/libEmbroideryTest/stdafx.cpp
blob: 22d9737e8b4ce7f6700e65698f58f4aedbfcd2c8 (plain)
1
2
3
4
5
6
7
8
// stdafx.cpp : source file that includes just the standard includes
// libEmbroideryTest.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
or: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Tango.Settings;

namespace Tango.PPC.Common.Update
{
    public static class UpdateServiceHelper
    {
        public static ChannelFactory<IPPCUpdateService> GetUpdateServiceChannel()
        {
            BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
            binding.ReceiveTimeout = TimeSpan.FromSeconds(60);
            binding.SendTimeout = TimeSpan.FromSeconds(60);
            binding.MaxBufferPoolSize = 6553600;
            binding.MaxBufferSize = 6553600;
            binding.MaxReceivedMessageSize = 6553600;
            binding.ReaderQuotas.MaxDepth = 6553600;
            binding.ReaderQuotas.MaxStringContentLength = 6553600;
            binding.ReaderQuotas.MaxArrayLength = 6553600;
            binding.ReaderQuotas.MaxBytesPerRead = 6553600;

            return new ChannelFactory<IPPCUpdateService>(binding, SettingsManager.Default.GetOrCreate<PPCSettings>().UpdateServiceAddress);
        }
    }
}