Esempio n. 1
0
        static void ConfigAdd(string[] args)
        {
            var squirrel = new SquirrelClient(new Uri("http://localhost:49622/squirrel"), "crm");

            var nut = new Nut { Table="ConnectionStrings", Key = "test", Value = "<endpoint xmlns='testing'><b>testing</b></endpoint>" };
            squirrel.Add(nut);
        }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            try
            {

                var uri = Uri;

                var tokens = uri.Split('/');

                var account = tokens[1];
                var table = tokens[0];
                var name = tokens[2];

                var squirrel = new SquirrelClient(new Uri("http://localhost/squirrel"), account);

                var cs = squirrel.Get(table, name);

                if (cs != null)
                {
                    WriteObject(cs.Value);
                }
            }
            catch (Exception eax)
            {
                WriteError( new ErrorRecord(eax, "", ErrorCategory.InvalidOperation, this));
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var squirrel = new SquirrelClient(new Uri("http://localhost/squirrel"), "crm");

            Nut nut = new Nut() { Table="ConnectionStrings",  Key = "intranetdb", Value = "this is my development intranet db connectionstring", Properties = new Dictionary<string,string>() };

            nut.Properties.Add("environment", "Development");
            squirrel.Add(nut);

            var cs = squirrel.Get("ConnectionStrings", "aem");

            Console.WriteLine(cs.Value);
        }
Esempio n. 4
0
        static void ConfigGet(string[] args)
        {
            var uri = args[1];
            var tokens = uri.Split('/');

            var account = tokens[1];
            var table = tokens[0];
            var name = tokens[2];

            var squirrel = new SquirrelClient(new Uri("http://localhost/squirrel"), account);

            var cs = squirrel.Get(table, name);

            if (cs != null)
            {
                Console.WriteLine(cs.Value);
            }
        }
Esempio n. 5
0
        protected override void ProcessRecord()
        {
            try
            {

                var uri = Uri;

                var tokens = uri.Split('/');

                var account = tokens[1];
                var table = tokens[0];
                var name = tokens[2];

                var squirrel = new SquirrelClient(new Uri("http://localhost/squirrel"), account);
                var nut = new Nut() { Key = name, Table = table, Value = Value };

                squirrel.Add(nut);
                WriteObject("Nut added");
            }
            catch (Exception eax)
            {
                WriteError(new ErrorRecord(eax, "", ErrorCategory.InvalidOperation, this));
            }
        }