private static void WriteCertFileConfig(string uniacid, ProcessMiniConfig pmc) { var document = new MongoDBTool().GetMongoCollection <BsonDocument>("CompanyModel").Find(Builders <BsonDocument> .Filter.Eq("uniacid", uniacid)).FirstOrDefault(); BsonValue cfn; if (document != null && document.TryGetValue("CertFileName", out cfn)) { pmc.SSLCERT_PATH = $"{MainConfig.BaseDir}{MainConfig.CertsDir}/{uniacid}/{cfn.ToString()}"; } }