update
This commit is contained in:
@@ -10,16 +10,12 @@ public abstract class WorkspaceFeature(string identifier, string name) : PluginF
|
||||
return workspace?.Config == null || workspace.Config.ProviderId == Identifier;
|
||||
}
|
||||
|
||||
public virtual bool Configure(ref IWorkspace? workspace)
|
||||
public virtual async Task Configure(WorkspaceContext context)
|
||||
{
|
||||
OnConfigure(ref workspace);
|
||||
await OnConfigure(context);
|
||||
|
||||
if (workspace?.Config is null)
|
||||
return false;
|
||||
|
||||
workspace.Config.ProviderId = Identifier;
|
||||
|
||||
return true;
|
||||
if (context?.Workspace?.Config is not null)
|
||||
context.Workspace.Config.ProviderId = Identifier;
|
||||
}
|
||||
|
||||
public virtual IWorkspace CreateFromConfig(WorkspaceConfig config)
|
||||
@@ -30,5 +26,5 @@ public abstract class WorkspaceFeature(string identifier, string name) : PluginF
|
||||
|
||||
protected abstract void OnCreate(out IWorkspace workspace, WorkspaceConfig config);
|
||||
|
||||
protected abstract bool OnConfigure(ref IWorkspace? workspace);
|
||||
protected abstract Task OnConfigure(WorkspaceContext context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user