• <bdo id='E27rI'></bdo><ul id='E27rI'></ul>
    <i id='E27rI'><tr id='E27rI'><dt id='E27rI'><q id='E27rI'><span id='E27rI'><b id='E27rI'><form id='E27rI'><ins id='E27rI'></ins><ul id='E27rI'></ul><sub id='E27rI'></sub></form><legend id='E27rI'></legend><bdo id='E27rI'><pre id='E27rI'><center id='E27rI'></center></pre></bdo></b><th id='E27rI'></th></span></q></dt></tr></i><div id='E27rI'><tfoot id='E27rI'></tfoot><dl id='E27rI'><fieldset id='E27rI'></fieldset></dl></div>
    <tfoot id='E27rI'></tfoot>
  • <small id='E27rI'></small><noframes id='E27rI'>

      1. <legend id='E27rI'><style id='E27rI'><dir id='E27rI'><q id='E27rI'></q></dir></style></legend>

      2. Azure Functions 如何将应用程序设置添加到绑定

        时间:2023-10-24
        <legend id='frpnF'><style id='frpnF'><dir id='frpnF'><q id='frpnF'></q></dir></style></legend>

        <small id='frpnF'></small><noframes id='frpnF'>

          <i id='frpnF'><tr id='frpnF'><dt id='frpnF'><q id='frpnF'><span id='frpnF'><b id='frpnF'><form id='frpnF'><ins id='frpnF'></ins><ul id='frpnF'></ul><sub id='frpnF'></sub></form><legend id='frpnF'></legend><bdo id='frpnF'><pre id='frpnF'><center id='frpnF'></center></pre></bdo></b><th id='frpnF'></th></span></q></dt></tr></i><div id='frpnF'><tfoot id='frpnF'></tfoot><dl id='frpnF'><fieldset id='frpnF'></fieldset></dl></div>
              <tbody id='frpnF'></tbody>

              • <tfoot id='frpnF'></tfoot>
                  <bdo id='frpnF'></bdo><ul id='frpnF'></ul>
                • 本文介绍了Azure Functions 如何将应用程序设置添加到绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用我的应用设置为我的 Azure 函数添加一些自定义绑定.我只需要从我的设置中接收字符串.

                  I'm trying to add some custom binding using my app settings for my Azure Function. I need to receive only string a string from my settings.

                  我想从我的设置中获取 simpleValue.

                  I would like to get simpleValue from my settings.

                  {
                     "bindings": [
                      {
                        "name": "someValue",
                        "type": "stringSetting",
                        "connection": "simpleValue",
                        "direction": "in"
                      }
                    ],
                    "disabled": false
                  }
                  

                  在 Run 方法中获取它:

                  and the get it in Run method:

                  static void GetOrders(TraceWriter log, string someValue)
                  {
                      log.Info(someValue);
                  }
                  

                  有没有可能.也许还有其他方法可以做到这一点?

                  Is it even possible. Maybe there is other way to do it?

                  推荐答案

                  我已经找到了解决方案.只需添加:

                  I already found the solution. Just add:

                  using System.Configuration;
                  

                  并将这一行添加到带有键(simpleValue")值的代码中:

                  and add this line to code with the key ("simpleValue") value:

                  ConfigurationManager.AppSettings["simpleValue"]
                  

                  这篇关于Azure Functions 如何将应用程序设置添加到绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:从 C# Azure 函数中访问证书 下一篇:Newtonsoft.Json 参考抱怨 Azure Functions

                  相关文章

                    <bdo id='qy3Rh'></bdo><ul id='qy3Rh'></ul>
                • <legend id='qy3Rh'><style id='qy3Rh'><dir id='qy3Rh'><q id='qy3Rh'></q></dir></style></legend>

                  <tfoot id='qy3Rh'></tfoot>

                  <small id='qy3Rh'></small><noframes id='qy3Rh'>

                  <i id='qy3Rh'><tr id='qy3Rh'><dt id='qy3Rh'><q id='qy3Rh'><span id='qy3Rh'><b id='qy3Rh'><form id='qy3Rh'><ins id='qy3Rh'></ins><ul id='qy3Rh'></ul><sub id='qy3Rh'></sub></form><legend id='qy3Rh'></legend><bdo id='qy3Rh'><pre id='qy3Rh'><center id='qy3Rh'></center></pre></bdo></b><th id='qy3Rh'></th></span></q></dt></tr></i><div id='qy3Rh'><tfoot id='qy3Rh'></tfoot><dl id='qy3Rh'><fieldset id='qy3Rh'></fieldset></dl></div>