forked from ddrilling/AsbCloudServer
59 lines
1.9 KiB
C#
59 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using AsbCloudDb.Model;
|
|
using AsbCloudDb;
|
|
using Google.Apis.Drive.v3.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System.Net.Mail;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace ConsoleApp1
|
|
{
|
|
//var options = new DbContextOptionsBuilder<AsbCloudDbContext>()
|
|
// .UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True")
|
|
// .Options;
|
|
//var context = new AsbCloudDbContext(options);
|
|
|
|
class Program
|
|
{
|
|
|
|
|
|
static void Main(/*string[] args*/)
|
|
{
|
|
var regex = new Regex(@"<[a-zA-Z0-9]+.*>.*<[a-zA-Z]+/*>");
|
|
var testHtml = "aa<H1>AAA<h1/><b>asdasd<b/>";
|
|
var t = regex.IsMatch(testHtml);
|
|
//SendMail.Main();
|
|
|
|
//DbDemoDataService.AddDemoData();
|
|
//.GetAwaiter().GetResult();
|
|
|
|
Console.WriteLine("End of Test");
|
|
Console.ReadLine();
|
|
//var options = new DbContextOptionsBuilder<AsbCloudDbContext>()
|
|
// .UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True")
|
|
// .Options;
|
|
//var context = new AsbCloudDbContext(options);
|
|
|
|
//var sett = context.Set<TelemetryDataSaub>();
|
|
//var r = context.Database.ExecInsertOrUpdateAsync(sett, new List<TelemetryDataSaub> {
|
|
// new TelemetryDataSaub
|
|
// {
|
|
// Date = DateTime.Now,
|
|
// IdTelemetry = 3,
|
|
// AxialLoad = 100.1f,
|
|
// },
|
|
// new TelemetryDataSaub
|
|
// {
|
|
// Date = DateTime.Now.AddSeconds(2),
|
|
// IdTelemetry = 3,
|
|
// AxialLoad = 100.2f,
|
|
// },
|
|
//}, System.Threading.CancellationToken.None).Result;
|
|
}
|
|
}
|
|
}
|