共用方式為


ConfigurationConsoleLoggerSettings.TryGetSwitch(String, LogLevel) 方法

定義

取得指定之參數的記錄層級。

public:
 virtual bool TryGetSwitch(System::String ^ name, [Runtime::InteropServices::Out] Microsoft::Extensions::Logging::LogLevel % level);
public bool TryGetSwitch (string name, out Microsoft.Extensions.Logging.LogLevel level);
abstract member TryGetSwitch : string * LogLevel -> bool
override this.TryGetSwitch : string * LogLevel -> bool
Public Function TryGetSwitch (name As String, ByRef level As LogLevel) As Boolean

參數

name
String

要查閱之參數的名稱。

level
LogLevel

當這個方法傳回時,如果找到參數,則包含 參數的值。 如果找不到參數,此參數會設定為 None

傳回

true 如果找到參數,則為 ,否則 false為 。

實作

例外狀況

適用於