using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace demo
{
    public class DynamicJsonContractResolver: DefaultContractResolver
    {
        private readonly string[] _props;

        public DynamicJsonContractResolver(params string[] prop)
        {
            this._props = prop;
        }

        protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
        {
            return base.CreateProperties(type, memberSerialization).Where(p => !this._props.Contains(p.PropertyName)).ToList();
        }
    }
}
posted @ 2021-08-23 15:59 天藐水瓶 阅读(48) 评论(0) 推荐(0) 编辑
摘要: list[^1] 阅读全文
posted @ 2021-07-29 09:59 天藐水瓶 阅读(7) 评论(0) 推荐(0) 编辑
摘要: http://www.golang-book.com/books/intro 阅读全文
posted @ 2021-07-23 18:56 天藐水瓶 阅读(42) 评论(0) 推荐(0) 编辑
摘要: @Html.Raw(Configuration.GetSection("ConnectionStrings")["DefaultConnectoin"]) <!-- 2 levels --> @Html.Raw(Configuration.GetSection("Logging")["LogLeve 阅读全文
posted @ 2021-07-22 17:41 天藐水瓶 阅读(32) 评论(0) 推荐(0) 编辑
摘要: public virtual void UpdateByProperties<TEntity>(TEntity entity, params Expression<Func<TEntity, object>>[] properties) where TEntity : class { var ent 阅读全文
posted @ 2021-07-20 18:19 天藐水瓶 阅读(23) 评论(0) 推荐(0) 编辑
摘要: public void Update(T entity, params Expression<Func<T, object>>[] properties) { _dbSet.Attach(entity); DbEntityEntry<T> entry = _context.Entry(entity) 阅读全文
posted @ 2021-07-16 14:45 天藐水瓶 阅读(28) 评论(0) 推荐(0) 编辑
摘要: https://www.electronjs.org/apps/anotherredisdesktopmanager 阅读全文
posted @ 2021-06-11 12:06 天藐水瓶 阅读(58) 评论(0) 推荐(0) 编辑
摘要: RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev RUN apt-get install -y fontconfig 阅读全文
posted @ 2021-04-27 20:36 天藐水瓶 阅读(32) 评论(0) 推荐(0) 编辑
摘要: https://stackoverflow.com/questions/249760/how-can-i-convert-a-unix-timestamp-to-datetime-and-vice-versa Unix time in seconds to UTC DateTimeOffset: D 阅读全文
posted @ 2021-03-31 08:38 天藐水瓶 阅读(127) 评论(0) 推荐(0) 编辑
摘要: https://stackoverflow.com/questions/4015324/how-to-make-an-http-post-web-request 阅读全文
posted @ 2021-02-04 09:43 天藐水瓶 阅读(47) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示