Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
kenelin committed Aug 28, 2021
1 parent c886de7 commit 761ce14
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
8 changes: 6 additions & 2 deletions source/Htc.Vita.Core/Auth/OAuth2.AuthorizationCodeFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ public abstract partial class AuthorizationCodeReceiver : IDisposable
Dispose(false);
}

/// <inheritdoc />
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
Expand Down Expand Up @@ -499,7 +501,9 @@ public abstract partial class AuthorizationCodeUserAgent : IDisposable
Dispose(false);
}

/// <inheritdoc />
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
Expand Down
4 changes: 2 additions & 2 deletions source/Htc.Vita.Core/Auth/OAuth2.Factory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static ClientFactory()
/// </summary>
/// <typeparam name="T"></typeparam>
public static void Register<T>()
where T : ClientFactory, new()
where T : ClientFactory, new()
{
TypeRegistry.Register<ClientFactory, T>();
}
Expand All @@ -180,7 +180,7 @@ public static ClientFactory GetInstance()
/// <typeparam name="T"></typeparam>
/// <returns>ClientFactory.</returns>
public static ClientFactory GetInstance<T>()
where T : ClientFactory, new()
where T : ClientFactory, new()
{
return TypeRegistry.GetInstance<ClientFactory, T>();
}
Expand Down
4 changes: 3 additions & 1 deletion source/Htc.Vita.Core/IO/UsbWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public abstract class UsbWatcher : IDisposable
Dispose(false);
}

/// <inheritdoc />
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
Expand Down
8 changes: 4 additions & 4 deletions source/Htc.Vita.Core/Net/DefaultWebProxyFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ protected override IWebProxy OnGetWebProxy()
{
const string valueName = "Proxy";
var webProxyUri = ParseWebProxyUri(
Registry.GetStringValue(
Registry.Hive.CurrentUser,
Win32Registry.GetStringValue(
Win32Registry.Hive.CurrentUser,
RegistryKeyPath,
valueName
)
) ?? ParseWebProxyUri(
Registry.GetStringValue(
Registry.Hive.LocalMachine,
Win32Registry.GetStringValue(
Win32Registry.Hive.LocalMachine,
RegistryKeyPath,
valueName
)
Expand Down
2 changes: 1 addition & 1 deletion source/Htc.Vita.Core/Util/Registry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace Htc.Vita.Core.Util
/// <summary>
/// Class Registry.
/// </summary>
[Obsolete("This class is obsoleted. Use Win32Registry instead.")]
public abstract class Registry
{
/// <summary>
Expand Down Expand Up @@ -271,7 +272,6 @@ public static int GetDwordValue64(Hive root, string keyPath, string valueName, i
/// <param name="keyPath">The key path.</param>
/// <param name="valueName">Name of the value.</param>
/// <returns>System.Int32.</returns>
[Obsolete("This method is obsoleted. Use Win32Registry.GetIntValue() instead.")]
public static int GetIntValue(Hive root, string keyPath, string valueName)
{
return GetIntValue(root, keyPath, valueName, 0);
Expand Down
4 changes: 2 additions & 2 deletions source/Htc.Vita.Core/Util/Win32Registry.Key.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,13 +1110,13 @@ public Key OpenSubKey(string subKeyName)
{
_handle.SetHandleAsInvalid();
_handle = null;
throw new IOException("Unexpected error: " + errorCode, (int)errorCode);
throw new IOException($"Unexpected error: {errorCode}", (int)errorCode);
}
if (errorCode == Windows.Error.FileNotFound)
{
throw new IOException("The specified registry key does not exist.", (int)errorCode);
}
throw new IOException("Unexpected error: " + errorCode, (int)errorCode);
throw new IOException($"Unexpected error: {errorCode}", (int)errorCode);
}

private static Windows.RegistryKeyAccessRights ToRegistryKeyAccessRight(bool isWritable)
Expand Down

0 comments on commit 761ce14

Please sign in to comment.