Files
DotNetAlpm/Program.cs
2020-04-27 12:34:56 -04:00

28 lines
843 B
C#

using System;
using System.Collections.Generic;
using Foodsoft.Alpm;
namespace Foodsoft.Alpm
{
class Program
{
static void Main(string[] args)
{
ErrNo err = ErrNo.ERR_OK;
using var h = new Handle("/", "/home/luebsj/db");
using var db = h.RegisterSyncDB("jkl-repo", SigLevel.SIG_PACKAGE_OPTIONAL | SigLevel.SIG_USE_DEFAULT);
db.Servers = new List<string> {"http://a.b.c", "http://d.e.f", "http://arch.johnluebs.com/x86_64"};
foreach (var a in db.Servers)
{
Console.WriteLine("Hello {0}", a);
}
var b = new string[3];
db.Servers.CopyTo(b, 0);
Console.WriteLine("Hello World! {0} {1} {2}", db.Name, API.Version,
b[0]);
}
}
}