Created
November 29, 2017 13:13
-
-
Save oleksabor/306c4df51d5953421baafa575cd65a7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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