public void IPGet()
        {
            Configure();
            var newIp = ipApi.FindById(ipBlock.Id, depth: 5);

            Assert.AreEqual(ipBlock.Id, newIp.Id);
        }
Esempio n. 2
0
        protected override void BeginProcessing()
        {
            try
            {
                var ipblockApi = new IPBlocksApi(Utilities.Configuration);

                if (!string.IsNullOrEmpty(IpBlockId))
                {
                    var ipblock = ipblockApi.FindById(IpBlockId, depth: 5);

                    WriteObject(ipblock);
                }
                else
                {
                    var ipblocks = ipblockApi.FindAll(depth: 5);
                    WriteObject(ipblocks.Items);
                }
            }
            catch (Exception ex)
            {
                WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null));
            }
        }