Skip to content

Commit

Permalink
🎨 model xmldoc fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzaz committed Dec 22, 2023
1 parent cd10cdf commit 2c2d034
Show file tree
Hide file tree
Showing 24 changed files with 671 additions and 85 deletions.
46 changes: 45 additions & 1 deletion src/BD.SteamClient8.Models/Extensions/SteamAppExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#pragma warning disable IDE0130
namespace BD.SteamClient8.Models.WebApi.SteamApp;

#pragma warning disable SA1600 // Elements should be documented
/// <summary>
/// <see cref="SteamApp"/> 扩展
/// </summary>
public static class SteamAppExtensions
{
#if (WINDOWS || MACCATALYST || MACOS || LINUX) && !(IOS || ANDROID)

/// <summary>
/// 从其他 <see cref="SteamApp"/> 修改内容
/// </summary>
/// <param name="steamApp"></param>
/// <param name="appInfo"></param>
/// <returns></returns>
public static bool SetEditProperty(this SteamApp steamApp, SteamApp appInfo)
{
if (steamApp._properties != null)
Expand Down Expand Up @@ -140,12 +148,23 @@ public static bool SetEditProperty(this SteamApp steamApp, SteamApp appInfo)

#endif

/// <summary>
/// 获取Id和名称,使用 | 分割
/// </summary>
/// <param name="steamApp"></param>
/// <returns></returns>
public static string GetIdAndName(this SteamApp steamApp)
{
return $"{steamApp.AppId} | {steamApp.DisplayName}";
}

#if (WINDOWS || MACCATALYST || MACOS || LINUX) && !(IOS || ANDROID)
/// <summary>
/// 启动 <see cref="SteamApp"/> 进程
/// </summary>
/// <param name="steamApp"></param>
/// <param name="runType"></param>
/// <returns></returns>
public static Process? StartSteamAppProcess(this SteamApp steamApp, SteamAppRunType runType = SteamAppRunType.Idle)
{
var arg = runType switch
Expand Down Expand Up @@ -190,6 +209,10 @@ public static string GetIdAndName(this SteamApp steamApp)
}
}

/// <summary>
/// 启动或停止 App
/// </summary>
/// <param name="steamApp"></param>
public static void RunOrStopSteamAppProcess(this SteamApp steamApp)
{
if (steamApp.Process != null && !steamApp.Process.HasExited)
Expand All @@ -203,6 +226,13 @@ public static void RunOrStopSteamAppProcess(this SteamApp steamApp)
}
}

/// <summary>
/// 将参数 <see cref="SteamAppPropertyTable"/> 内容导出到 <see cref="SteamApp"/>
/// </summary>
/// <param name="steamApp"></param>
/// <param name="properties"></param>
/// <param name="installedAppIds"></param>
/// <returns></returns>
public static SteamApp ExtractReaderProperty(this SteamApp steamApp, SteamAppPropertyTable properties, uint[]? installedAppIds = null)
{
if (properties != null)
Expand Down Expand Up @@ -310,6 +340,14 @@ select prop.GetValue<SteamAppPropertyTable>()
return steamApp;
}

/// <summary>
/// 通过 <see cref="BinaryReader"/> 读取实例出 <see cref="SteamApp"/>
/// </summary>
/// <param name="reader"></param>
/// <param name="installedAppIds"></param>
/// <param name="isSaveProperties"></param>
/// <param name="is0x07564428"></param>
/// <returns></returns>
public static SteamApp? FromReader(BinaryReader reader, uint[]? installedAppIds = null, bool isSaveProperties = false, bool is0x07564428 = true)
{
uint id = reader.ReadUInt32();
Expand Down Expand Up @@ -352,6 +390,12 @@ select prop.GetValue<SteamAppPropertyTable>()
return app;
}

/// <summary>
/// 将 <see cref="SteamApp"/> 内容写入 <see cref="BinaryReader"/>
/// </summary>
/// <param name="steamApp"></param>
/// <param name="writer"></param>
/// <exception cref="ArgumentNullException"></exception>
public static void Write(this SteamApp steamApp, BinaryWriter writer)
{
if (steamApp._properties == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ namespace BD.SteamClient8.Models.WebApi.Authenticator;

#pragma warning disable SA1600 // Elements should be documented

/// <summary>
/// 刷新 AccessToken 接口返回模型类
/// </summary>
public class GenerateAccessTokenForAppResponse
{
/// <summary>
Expand All @@ -11,6 +14,9 @@ public class GenerateAccessTokenForAppResponse
public GenerateAccessTokenForAppResponseResponse? Response;
}

/// <summary>
/// <see cref="GenerateAccessTokenForAppResponse.Response"/> 模型类
/// </summary>
public class GenerateAccessTokenForAppResponseResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace BD.SteamClient8.Models.WebApi.Authenticator.PhoneNumber;

#pragma warning disable SA1600 // Elements should be documented

/// <summary>
/// GetUserCountry 接口返回模型类
/// </summary>
public class GetUserCountryResponse
{
/// <summary>
Expand All @@ -11,6 +12,9 @@ public class GetUserCountryResponse
public GetUserCountryResponseResponse? Response { get; set; }
}

/// <summary>
/// <see cref="GetUserCountryResponse.Response"/> 详细信息
/// </summary>
public class GetUserCountryResponseResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace BD.SteamClient8.Models.WebApi.Authenticator.PhoneNumber;

#pragma warning disable SA1600 // Elements should be documented

/// <summary>
/// AccountWaitingForEmailConfirmation 接口返回模型类
/// </summary>
public class IsAccountWaitingForEmailConfirmationResponse
{
/// <summary>
Expand All @@ -11,6 +12,9 @@ public class IsAccountWaitingForEmailConfirmationResponse
public IsAccountWaitingForEmailConfirmationResponseResponse? Response { get; set; }
}

/// <summary>
/// <see cref="IsAccountWaitingForEmailConfirmationResponse.Response"/> 模型类
/// </summary>
public class IsAccountWaitingForEmailConfirmationResponseResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ namespace BD.SteamClient8.Models.WebApi.Authenticator.PhoneNumber;

#pragma warning disable SA1600 // Elements should be documented

/// <summary>
/// AddPhoneNumberAsync 接口返回模型类
/// </summary>
public class SteamAddPhoneNumberResponse
{
/// <summary>
Expand All @@ -11,6 +14,9 @@ public class SteamAddPhoneNumberResponse
public SteamAddPhoneNumberResponseResponse? Response { get; set; }
}

/// <summary>
/// <see cref="SteamAddPhoneNumberResponse.Response"/> 模型类
/// </summary>
public class SteamAddPhoneNumberResponseResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ namespace BD.SteamClient8.Models.WebApi.Authenticator;

#pragma warning disable SA1600 // Elements should be documented

/// <summary>
/// RemoveAuthenticatorAsync 接口返回模型类
/// </summary>
public class RemoveAuthenticatorResponse
{
/// <summary>
Expand All @@ -11,6 +14,9 @@ public class RemoveAuthenticatorResponse
public RemoveAuthenticatorResponseResponse? Response { get; set; }
}

/// <summary>
/// <see cref="RemoveAuthenticatorResponse.Response"/> 模型类
/// </summary>
public class RemoveAuthenticatorResponseResponse
{
/// <summary>
Expand Down
Loading

0 comments on commit 2c2d034

Please sign in to comment.