Compartir a través de


Workspace.CanApplyCompilationOptionChange Método

Definición

Se llama durante una llamada a para TryApplyChanges(Solution) determinar si se permite un cambio específico en CompilationOptions .

protected virtual bool CanApplyCompilationOptionChange (Microsoft.CodeAnalysis.CompilationOptions oldOptions, Microsoft.CodeAnalysis.CompilationOptions newOptions, Microsoft.CodeAnalysis.Project project);
public virtual bool CanApplyCompilationOptionChange (Microsoft.CodeAnalysis.CompilationOptions oldOptions, Microsoft.CodeAnalysis.CompilationOptions newOptions, Microsoft.CodeAnalysis.Project project);
abstract member CanApplyCompilationOptionChange : Microsoft.CodeAnalysis.CompilationOptions * Microsoft.CodeAnalysis.CompilationOptions * Microsoft.CodeAnalysis.Project -> bool
override this.CanApplyCompilationOptionChange : Microsoft.CodeAnalysis.CompilationOptions * Microsoft.CodeAnalysis.CompilationOptions * Microsoft.CodeAnalysis.Project -> bool
Protected Overridable Function CanApplyCompilationOptionChange (oldOptions As CompilationOptions, newOptions As CompilationOptions, project As Project) As Boolean
Public Overridable Function CanApplyCompilationOptionChange (oldOptions As CompilationOptions, newOptions As CompilationOptions, project As Project) As Boolean

Parámetros

oldOptions
CompilationOptions

El antiguo CompilationOptions del proyecto anterior al cambio.

newOptions
CompilationOptions

CompilationOptions Nuevo del proyecto que se pasó a TryApplyChanges(Solution).

project
Project

Proyecto contenido en el Solution objeto pasado a TryApplyChanges(Solution).

Devoluciones

Comentarios

Solo se llama a este método si CanApplyChange(ApplyChangesKind) devuelve false para ChangeCompilationOptions. Si CanApplyChange(ApplyChangesKind) devuelve true, significa que se permiten todos los cambios y no es necesario llamar a este método.

Se aplica a