AzureML.PowerShell.GetExperiment.ProcessRecord C# (CSharp) Method

ProcessRecord() protected method

protected ProcessRecord ( ) : void
return void
        protected override void ProcessRecord()
        {
            if (string.IsNullOrEmpty(ExperimentId))
            {
                // get all experiments in the workspace
                Experiment[] exps = Sdk.GetExperiments(GetWorkspaceSetting());
                WriteObject(exps, true);
            }
            else
            {
                // get a specific experiment
                string rawJson = string.Empty;
                string errorMsg = string.Empty;
                Experiment exp = Sdk.GetExperimentById(GetWorkspaceSetting(), ExperimentId, out rawJson);
                WriteObject(exp);
            }
        }
    }