1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore;
- using Microsoft.AspNetCore.Hosting;
- using Microsoft.Extensions.Configuration;
- using Microsoft.Extensions.Logging;
- using Newtonsoft.Json.Linq;
- using TEAMModelOS.SDK.Extension.JsonPath;
- using TEAMModelOS.SDK.Helper.Common.JsonHelper;
- namespace TEAMModelOS.Test.CosmosDB
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- //var map = new List<int>() { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 0, 1 };
- //var map1 = new List<int>(){ 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 3, 3, 2, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1 };
- //var m = new List<List<int>>
- //{
- // map,
- // map1
- //};
- //var a = m[0].Sum();
- //var b = m[1].Sum();
- //IHostingEnvironment _hostingEnvironment = ;
- // 获取系统路径
- string contentRootPath = "";
- string identity = "IES/adas";
- string query = "$.info";
- JObject parsedJson = JObject.Parse(identity);
- JsonPathContext context = new JsonPathContext
- { ValueSystem = new JsonNetValueSystem() };
- List<dynamic> papers = context.SelectNodes(parsedJson,
- query).Select(node => node.Value).ToList();
- //m.ToJson();
- //CreateWebHostBuilder(args).Build().Run();
- }
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup<Startup>();
- }
- }
|