小编Pon*_*ian的帖子

为什么 C# 的“is”运算符在比较两个布尔值时给出正确的结果,我应该使用它吗?

我注意到这个is运算符产生相同的结果,甚至编译出与该运算符相同的结果(请参阅此要点==is鉴于我只能在文档中看到与运行时类型测试相关的内容,这是该运算符的正确用法吗?

bool test = false;

if(!test)
{
// some code
}

//OR

if(test is false)
{
// some code
}
Run Code Online (Sandbox Code Playgroud)

c# c#-7.0

9
推荐指数
1
解决办法
1608
查看次数

如何通过二头肌将应用程序配置设置粘贴到暂存槽

如何通过二头肌将应用程序配置设置粘贴到插槽?

这是我的二头肌文件:

var stagingSettings = [  
  {
    name: 'AzureFunctionsJobHost__extensions__durableTask__hubName'
    value: 'staging'
    slotSetting: true
  }
]


resource functionApp 'Microsoft.Web/sites/slots@2018-11-01' = {
  name: name
  kind: kind
  location: location
  properties: {
    clientAffinityEnabled: true
    enabled: true
    httpsOnly: true
    serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
    siteConfig: {
      use32BitWorkerProcess : false
      appSettings: stagingSettings 
    }
  }
  identity: {
    type: 'SystemAssigned'
  }
}
Run Code Online (Sandbox Code Playgroud)

在部署此代码时,我没有看到应用程序配置设置粘在插槽上:

在此输入图像描述

复选框未选中。我缺少什么?

azure azure-resource-manager azure-deployment-slots azure-functions azure-bicep

3
推荐指数
1
解决办法
3620
查看次数