/// <summary> /// Executes the get workflow command /// </summary> public override void ExecuteCmdlet() { base.ExecuteCmdlet(); if (!string.IsNullOrWhiteSpace(Version)) { this.WriteObject(LogicAppClient.GetWorkflowVersion(this.ResourceGroupName, this.Name, this.Version), true); } else if (string.IsNullOrEmpty(ResourceGroupName)) { var allWorkflows = LogicAppClient.ListWorkFlowBySubscription(); if (string.IsNullOrEmpty(Name)) { this.WriteObject(allWorkflows.ToArray(), true); } else { this.WriteObject(allWorkflows.Where(a => a.Name.Equals(Name, StringComparison.CurrentCultureIgnoreCase)).ToArray(), true); } } else if (string.IsNullOrEmpty(Name)) { this.WriteObject(LogicAppClient.ListWorkFlowByResourceGroupName(ResourceGroupName).ToArray()); } else { this.WriteObject(LogicAppClient.GetWorkflow(this.ResourceGroupName, this.Name), true); } }