Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Penneo Testing!");
            PenneoConnector.Initialize("", "", "https://app.penneo.com/api/v1/");

            // Create a new case file
            var myCaseFile = new CaseFile("Demo case file");

            myCaseFile.Persist();

            // Create a new signable document in this case file
            var myDocument = new Document(myCaseFile, "Demo Document", @".\document.pdf");

            myDocument.MakeSignable();
            myDocument.Persist();

            for (int i = 0; i < 3; i++)
            {
                // Create a new signer that can sign documents in the case file
                var mySigner = new Signer(myCaseFile, "John Doe " + i);

                mySigner.Persist();

                // Create a new signature line on the document
                var mySignatureLine = new SignatureLine(myDocument, "MySignerRole " + i);

                mySignatureLine.Persist();

                // Map the signer to the signing request
                mySignatureLine.SetSigner(mySigner);

                // Update the signing request for the new signer
                var mySigningRequest = mySigner.GetSigningRequest();
                mySigningRequest.SuccessUrl = "http://*****:*****@board-governance.com";
                mySigningRequest.Persist();

                Console.WriteLine("<a href=\"" + mySigningRequest.GetLink() + "\">Sign now</a>");
            }

            // "Package" the case file for "sending".
            myCaseFile.Send();

            // And finally, print out the link leading to the signing portal.
            // The signer uses this link to sign the document.
            Console.WriteLine("Finished");
            Console.ReadLine();
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            if (args.Length != 3)
            {
                Console.WriteLine("Parameters required: endpoint, key, secret");
                Environment.Exit(-1);
            }

            string endpoint = args[0];
            string key      = args[1];
            string secret   = args[2];

            PenneoConnector.Initialize(key, secret, endpoint);
            PenneoConnector.SetLogger(new Logger());
            run();
        }
Exemplo n.º 3
0
 public void AssemblyInit()
 {
     PenneoConnector.Initialize(null, null);
 }