示例#1
0
    public static int Main(string[] args)
    {
        XarkId x;

        if (args.Length == 0)
        {
            Console.WriteLine("Creating...");
            x = new XarkId();
        }
        else
        {
            Console.WriteLine("Parsing...");
            try {
                x = new XarkId(args[0]);
            } catch {
                Console.WriteLine("Not a valid XARK ID.");
                return((int)ExitCode.Error);
            }
        }

        Console.WriteLine(x.ToString());
        Console.WriteLine(x.ToString("b"));
        Console.WriteLine(x.ToString("g"));
        Console.WriteLine(x.GetTimestamp());
        return((int)ExitCode.Success);
    }
示例#2
0
        public void TestBase64ToEmptyComb()
        {
            var g1 = new XarkId("AAAAAAAAAAAAAAAAAAAA");
            var g2 = EmptyXarkId();

            Assert.Equal(g2, g1);
        }