예제 #1
0
        protected override void ProcessRecord()
        {
            var itemList = DataLakeAnalyticsClient.GetCatalogItem(ResourceGroupName, Account, Path, ItemType);

            if (itemList.Count == 1)
            {
                WriteObject(itemList[0]);
            }
            else
            {
                WriteObject(itemList, true);
            }
        }
예제 #2
0
        public override void ExecuteCmdlet()
        {
            var itemList = DataLakeAnalyticsClient.GetCatalogItem(ResourceGroupName, Account, Path, ItemType);

            if (itemList.Count == 1)
            {
                WriteObject(itemList[0]);
            }
            else
            {
                WriteObject(itemList, true);
            }
        }
예제 #3
0
        protected override void ProcessRecord()
        {
            try
            {
                DataLakeAnalyticsClient.GetCatalogItem(ResourceGroupName, Account, Path, ItemType);
                WriteObject(true);
            }
            catch (Exception e)
            {
                if (e.Message.Equals(string.Format(Resources.InvalidCatalogPath, Path.FullCatalogItemPath),
                                     StringComparison.CurrentCultureIgnoreCase))
                {
                    throw;
                }

                WriteObject(false);
            }
        }