static void Initialize() { // NOTE: Types conversion registrations have to happen in InitializeOnLoadMethod, // otherwise they could be registered too late and some conversions would fail silently. TypeConversion.Register <SerializedStringView, IBuildStep>(view => BuildStep.Deserialize(view.ToString())); TypeConversion.Register <SerializedStringView, RunStep>(view => RunStep.Deserialize(view.ToString())); }
/// <summary> /// Create a new instance of <see cref="RunStepResult"/> that represent a successful execution. /// </summary> /// <param name="config">The <see cref="BuildConfiguration"/> used by the <see cref="Build.RunStep"/>.</param> /// <param name="step">The <see cref="Build.RunStep"/> that was executed.</param> /// <param name="instance">The <see cref="IRunInstance"/> resulting from running this <see cref="Build.RunStep"/>.</param> /// <returns>A new <see cref="RunStepResult"/> instance.</returns> public static RunStepResult Success(BuildConfiguration config, RunStep step, IRunInstance instance) => new RunStepResult { Succeeded = true, BuildConfiguration = config, RunStep = step, RunInstance = instance };
/// <summary> /// Create a new instance of <see cref="RunStepResult"/> that represent a failed execution. /// </summary> /// <param name="config">The <see cref="BuildConfiguration"/> used by the <see cref="Build.RunStep"/>.</param> /// <param name="step">The <see cref="Build.RunStep"/> that was executed.</param> /// <param name="exception">The exception.</param> /// <returns>A new <see cref="RunStepResult"/> instance.</returns> public static RunStepResult Failure(BuildConfiguration config, RunStep step, Exception exception) => new RunStepResult { Succeeded = false, BuildConfiguration = config, RunStep = step, RunInstance = null, Exception = exception };
/// <summary> /// Create a new instance of <see cref="RunStepResult"/> that represent a failed execution. /// </summary> /// <param name="config">The <see cref="BuildConfiguration"/> used by the <see cref="Build.RunStep"/>.</param> /// <param name="step">The <see cref="Build.RunStep"/> that was executed.</param> /// <param name="message">The failure message.</param> /// <returns>A new <see cref="RunStepResult"/> instance.</returns> public static RunStepResult Failure(BuildConfiguration config, RunStep step, string message) => new RunStepResult { Succeeded = false, BuildConfiguration = config, RunStep = step, RunInstance = null, Message = message };
void OnRunStepSelectorClicked(EventBase @event) { SearcherWindow.Show( EditorWindow.focusedWindow, new Searcher( TypeSearcherDatabase.GetRunStepDatabase(new HashSet <Type>(RunStep.GetAvailableTypes(type => !IsShown(type)))), new AddTypeSearcherAdapter("Select Run Script")), UpdateRunStep, @event.originalMousePosition + Vector2.up * 35.0f, a => { }, new SearcherWindow.Alignment(SearcherWindow.Alignment.Vertical.Top, SearcherWindow.Alignment.Horizontal.Left) ); }
internal static string Serialize(RunStep step) { return(step?.GetType().GetFullyQualifedAssemblyTypeName()); }
public VisitStatus Visit <TProperty, TContainer>(IPropertyVisitor visitor, TProperty property, ref TContainer container, ref RunStep value, ref ChangeTracker changeTracker) where TProperty : IProperty <TContainer, RunStep> { AppendJsonString(property, RunStep.Serialize(value)); return(VisitStatus.Override); }
protected override void Reset() { base.Reset(); BuildSteps.Clear(); RunStep = null; }