小编Mas*_*ske的帖子

vuelidate:验证依赖于其值的项目列表

我需要验证与元素本身的值相关的列表元素。

是否有可能或者我应该为每个产品创建一个验证?

new Vue({
    el: "#app",
  data: {
    text: '',
    sons: [
      {amount: 20, pending: 50}, 
      {amount: 30, pending: 150}
    ]
  },
  validations: {
    text: {
      required,
      minLength: minLength(5)
    },
    sons: {
      minLength: 3,
      $each: {
        amount: {
          maxValue: maxValue(this.sons[x].pending) // how to set x?
        }
      }
    }
  }
})
Run Code Online (Sandbox Code Playgroud)

https://jsfiddle.net/e0tL4yph/

vue.js vuelidate

5
推荐指数
1
解决办法
2494
查看次数

使用List <int>中的ID过滤linq

我需要做一个过滤器,使用列表中包含的参数来请求数据.

if (filter.Sc.Count > 0)
    socios.Where(s => filter.Sc.Contains(s.ScID));
Run Code Online (Sandbox Code Playgroud)

我尝试这种方式,但这不起作用,我也试过......

socios.Where( s => filter.Sc.All(f => f == s.ScID));
Run Code Online (Sandbox Code Playgroud)

我怎么能这样做过滤器?

c# linq asp.net-mvc-5

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

X509Certificate2 将私钥访问为安全令牌

我必须使用存储在安全令牌中的证书。我可以从 Windows 证书存储中访问它,但设备有密码,因此会显示一个带有输入字段的弹出窗口。

这是我用于加载证书的代码:

static X509Certificate2 BuscarCertificado
    (StoreLocation location, StoreName name, 
    X509FindType findType, string findValue)
{
    X509Store store = new X509Store(name, location);
    try{
        store.Open(OpenFlags.ReadOnly);

        X509Certificate2Collection col = store.Certificates.Find
            (findType, findValue, true);

        return col[0];
    }
    finally { store.Close(); }
}
Run Code Online (Sandbox Code Playgroud)

该设备是 ACS CryptoMate64 0。

是否可以在代码中发送密码以不显示此消息?

谢谢你的帮助

c# x509certificate2 asp.net-mvc-5

2
推荐指数
1
解决办法
3542
查看次数

标签 统计

asp.net-mvc-5 ×2

c# ×2

linq ×1

vue.js ×1

vuelidate ×1

x509certificate2 ×1