@@ -15,7 +15,6 @@ public sealed class SmartlingConfiguration : ISmartlingConfiguration
1515
1616 public SmartlingConfiguration ( IConfiguration config )
1717 {
18- //important, new instance otherwise we end up concatenating the uri over an over
1918 var smartlingSettings = config . Get < SmartlingSettings > ( ) ;
2019 EndPoints = smartlingSettings . SmartlingEndPoints ;
2120 SmartlingEndPoints endPointPaths = smartlingSettings . SmartlingEndPoints ;
@@ -43,61 +42,6 @@ public SmartlingConfiguration(IConfiguration config)
4342 throw new ArgumentException ( "ServiceBaseUri is not set in appsettings.json" ) ;
4443 }
4544 }
46- //private static SmartlingConfiguration _instance = null;
47- //private static readonly object oLock = new object();
48-
49- //private string _baseUri;
50- //public required string workflowUid { get; private set; }
51- //public required SmartlingEndPoints EndPoints { get; set; }
52- //public required SmartlingAuthorization Authorization { get; set; }
53- //private static SmartlingConfiguration Initialize(AppSettings appSettings)
54- //{
55- // SmartlingConfiguration config = new SmartlingConfiguration();
56- // //important, new instance otherwise we end up concatenating the uri over an over
57- // config.EndPoints = new SmartlingEndPoints();
58- // SmartlingEndPoints endPointPaths = appSettings.SmartlingEndPoints;
59- // config.Authorization = appSettings.SmartlingAuthorization;
60- // config.workflowUid = appSettings.SmartlingWorkflowUid;
61- // config._baseUri = appSettings.TranslationServiceBaseUri;
62-
63- // if (!string.IsNullOrEmpty(config._baseUri) && config.EndPoints != null)
64- // {
65- // config.EndPoints.ExportAPI = config._baseUri + endPointPaths.ExportAPI;
66- // config.EndPoints.ImportAPI = config._baseUri + endPointPaths.ImportAPI;
67- // config.EndPoints.JobAPI = config._baseUri + endPointPaths.JobAPI;
68- // config.EndPoints.JobBatchAPI = config._baseUri + endPointPaths.JobBatchAPI;
69- // config.EndPoints.AuthenticateAPI = config._baseUri + endPointPaths.AuthenticateAPI;
70- // config.EndPoints.DownloadFile = config._baseUri + endPointPaths.DownloadFile;
71- // config.EndPoints.FileStatus = config._baseUri + endPointPaths.FileStatus;
72- // }
73- // else
74- // {
75- // throw new Exception("TranslationServiceBaseUri is not set in appsettings.json");
76- // }
77-
78- // return config;
79- //}
80-
81- //public static SmartlingConfiguration InitializeInstance(AppSettings appSettings)
82- //{
83- // lock (oLock)
84- // {
85- // if (_instance == null)
86- // {
87- // _instance = Initialize(appSettings);
88- // }
89- // return _instance;
90- // }
91- //}
92-
93- //public static SmartlingConfiguration GetInstance()
94- //{
95- // return _instance;
96- //}
97-
98- //public SmartlingConfiguration Get()
99- //{
100- // return _instance;
101- //}
45+
10246 }
10347}
0 commit comments