public static object GetDefaultValue(this Interface.Io.Inputs.IStep inputStep) { // use this dummy is for future-proofing. Just in case "Default" is changed in the future StepStringInput dummy; return(inputStep.GetPropertyValue(nameof(dummy.Default))); }
/// <summary> /// Get the value of non-path type Stet input. Returns null if inputStep is a path type /// </summary> /// <param name="inputStep"></param> /// <returns></returns> public static object GetValue(this Interface.Io.Inputs.IStep inputStep) { if (inputStep.IsValueType()) { StepStringInput dummy; return(inputStep.GetPropertyValue(nameof(dummy.Value))); } else { return(null); } }
/// <summary> /// Get the source of a path type Step input. Returns null if inputStep is not path type /// </summary> /// <param name="inputStep"></param> /// <returns></returns> public static AnyOf <HTTP, S3, ProjectFolder> GetPathSource(this Interface.Io.Inputs.IStep inputStep) { if (inputStep.IsPathType()) { StepFileInput dummy; return(inputStep.GetPropertyValue(nameof(dummy.Source)) as AnyOf <HTTP, S3, ProjectFolder>); } else { return(null); } }