Udostępnij za pośrednictwem


Workspace.TryApplyChanges(Solution) Method

Definition

Apply changes made to a solution back to the workspace.

The specified solution must be one that originated from this workspace. If it is not, or the workspace has been updated since the solution was obtained from the workspace, then this method returns false. This method will still throw if the solution contains changes that are not supported according to the CanApplyChange(ApplyChangesKind) method.

public:
 virtual bool TryApplyChanges(Microsoft::CodeAnalysis::Solution ^ newSolution);
public virtual bool TryApplyChanges (Microsoft.CodeAnalysis.Solution newSolution);
abstract member TryApplyChanges : Microsoft.CodeAnalysis.Solution -> bool
override this.TryApplyChanges : Microsoft.CodeAnalysis.Solution -> bool
Public Overridable Function TryApplyChanges (newSolution As Solution) As Boolean

Parameters

newSolution
Solution

Returns

Exceptions

Thrown if the solution contains changes not supported according to the CanApplyChange(ApplyChangesKind) method.

Applies to