PathHelper.GetSecretsPath 方法

定义

重载

GetSecretsPath(IFileProvider)
已过时。

此方法已过时,并将从未来版本中删除。This method is obsolete and will be removed in a future version. 建议的替代项为 GetSecretsPathFromSecretsId(String)The recommended alternative is GetSecretsPathFromSecretsId(String).

获取机密文件的路径。Gets the path to the secrets file. 如果提供了一个目录,将在名为“project.json”的 JSON 中查找用户机密 ID。If a directory is given, finds the user secrets id in the JSON named 'project.json'.

GetSecretsPath(String)
已过时。

此方法已过时,并将从未来版本中删除。This method is obsolete and will be removed in a future version. 建议的替代项为 GetSecretsPathFromSecretsId(String)The recommended alternative is GetSecretsPathFromSecretsId(String).

获取机密文件的路径。Gets the path to the secrets file. 如果提供了一个目录,将在名为“project.json”的 JSON 中查找用户机密 ID。If a directory is given, finds the user secrets id in the JSON named 'project.json'.

GetSecretsPath(IFileProvider)

注意

This method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(string).

此方法已过时,并将从未来版本中删除。This method is obsolete and will be removed in a future version. 建议的替代项为 GetSecretsPathFromSecretsId(String)The recommended alternative is GetSecretsPathFromSecretsId(String).

获取机密文件的路径。Gets the path to the secrets file. 如果提供了一个目录,将在名为“project.json”的 JSON 中查找用户机密 ID。If a directory is given, finds the user secrets id in the JSON named 'project.json'.

public:
 static System::String ^ GetSecretsPath(Microsoft::Extensions::FileProviders::IFileProvider ^ provider);
public static string GetSecretsPath (Microsoft.Extensions.FileProviders.IFileProvider provider);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(string).")]
public static string GetSecretsPath (Microsoft.Extensions.FileProviders.IFileProvider provider);
static member GetSecretsPath : Microsoft.Extensions.FileProviders.IFileProvider -> string
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(string).")>]
static member GetSecretsPath : Microsoft.Extensions.FileProviders.IFileProvider -> string
Public Shared Function GetSecretsPath (provider As IFileProvider) As String

参数

provider
IFileProvider

文件提供程序The file provider

返回

String

机密文件的文件路径The filepath to secrets file

属性

适用于

GetSecretsPath(String)

注意

This method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(string).

此方法已过时,并将从未来版本中删除。This method is obsolete and will be removed in a future version. 建议的替代项为 GetSecretsPathFromSecretsId(String)The recommended alternative is GetSecretsPathFromSecretsId(String).

获取机密文件的路径。Gets the path to the secrets file. 如果提供了一个目录,将在名为“project.json”的 JSON 中查找用户机密 ID。If a directory is given, finds the user secrets id in the JSON named 'project.json'.

public:
 static System::String ^ GetSecretsPath(System::String ^ projectPath);
public static string GetSecretsPath (string projectPath);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(string).")]
public static string GetSecretsPath (string projectPath);
static member GetSecretsPath : string -> string
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPathFromSecretsId(string).")>]
static member GetSecretsPath : string -> string
Public Shared Function GetSecretsPath (projectPath As String) As String

参数

projectPath
String

项目文件The project file

返回

String

机密文件的文件路径The filepath to secrets file

属性

适用于