コード例 #1
0
        static void Main(string[] args)
        {
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            ddInfosApiInstance = new DdInfosApi();

            var driverDataList = ddInfosApiInstance.GetDdInfo();

            foreach (var driverData in driverDataList)
            {
                if (!File.Exists(path + driverData.XmlRef))
                {
                    ddFileApiInstance = new DdFileApi();

                    string xmlref = driverData.XmlRef;
                    string format = null;

                    Stream     response2 = ddFileApiInstance.GetDdfileByRef(xmlref, format);
                    FileStream file      = new FileStream(path + driverData.XmlRef, FileMode.Create, System.IO.FileAccess.Write);


                    response2.CopyTo(file);
                }
            }

            Console.ReadKey();
        }
コード例 #2
0
        private void InitApiEndpoints()
        {
            try
            {
                // enable SSL/TLS
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

                versionInstance    = new VersionApi();
                ddInfosApiInstance = new DdInfosApi();
                ddFileApiInstance  = new DdFileApi();
            }
            catch (Exception e)
            {
                throw new Exception("Error by init api endpoints", e);
            }
        }
コード例 #3
0
 public void Init()
 {
     instance = new DdInfosApi();
 }