Skip to content

Instantly share code, notes, and snippets.

@oleksabor
Created November 29, 2017 13:13
Show Gist options
  • Save oleksabor/306c4df51d5953421baafa575cd65a7c to your computer and use it in GitHub Desktop.
Save oleksabor/306c4df51d5953421baafa575cd65a7c to your computer and use it in GitHub Desktop.
using Countersoft.Gemini.Api;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace GeminiConsole
{
class Program
{
static void Main(string[] args)
{
var geminiUrl = args[0];
var cu = WindowsIdentity.GetCurrent().Name;
try
{
var g = new ServiceManager(geminiUrl, cu, "", "", true);
Console.WriteLine("connected to the gemini as '{0}'", g.User.WhoAmI().Fullname);
}
catch (Exception ex)
{
Console.WriteLine("{0} connection error. {1}", geminiUrl, cu);
while (ex != null)
{
Console.WriteLine("{0} {1}", ex.GetType().Name, ex.Message);
ex = ex.InnerException;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment