Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade target framework from NET Standard 2.0 to .NET 6.0 #393

Merged
merged 33 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
827bf53
All Set and done
YBTopaz8 Nov 28, 2024
72754d6
Update UI elements, add icons, and conditional compilation
YBTopaz8 Nov 28, 2024
dbb9ad1
Refactor and enhance UI and services
YBTopaz8 Nov 29, 2024
4bdec70
Refactor and update ParseLiveQueryClient and projects
YBTopaz8 Nov 30, 2024
ac325b2
Refactor and enhance FlowHub-MAUI and ParseLiveQuery
YBTopaz8 Nov 30, 2024
b13afac
Refactor methods to use block bodies for readability
YBTopaz8 Dec 1, 2024
b5057d4
save
YBTopaz8 Dec 1, 2024
1c29bc1
Finally Fixed for .net 9 and MAUI
YBTopaz8 Dec 2, 2024
fe93551
Upgraded to .NET6+ & Updated UnitTests
YBTopaz8 Dec 8, 2024
838e2d8
Enhance .NET Compatibility & Complete TODOs
YBTopaz8 Dec 10, 2024
ece8084
Merge branch 'master' into Testt
mtrezza Dec 10, 2024
d3164c5
Update Parse/Infrastructure/CacheController.cs
YBTopaz8 Dec 11, 2024
ccf2807
Improved Locking Mechanism, now using SemaphoreLock and some minor ch…
YBTopaz8 Dec 11, 2024
e5bbeba
Fully Fixed Parse SDK
YBTopaz8 Dec 12, 2024
e478005
update CI
mtrezza Dec 13, 2024
9124596
Update ci.yml
mtrezza Dec 13, 2024
281130f
Update ci.yml
mtrezza Dec 13, 2024
4940f44
Simplify targets, update tests, and enhance error handling
YBTopaz8 Dec 13, 2024
60e9356
Merge branch 'Testt' of https://github.com/YBTopaz8/Parse-SDK-dotNET …
YBTopaz8 Dec 13, 2024
c35b893
Fixed compat issue brought by VS
YBTopaz8 Dec 13, 2024
8b2af66
Re-Added several .net target versions to now 6,7,8,9 instead of only 8
YBTopaz8 Dec 13, 2024
b0e6082
Reverted Proj changes not destined here
YBTopaz8 Dec 13, 2024
d28e03c
All set.
YBTopaz8 Dec 13, 2024
760e11e
Update ci.yml
mtrezza Dec 13, 2024
369a1a6
Update ci.yml
mtrezza Dec 13, 2024
848d6eb
Update ci.yml
mtrezza Dec 13, 2024
09965a5
Test in multiple NET frameworks
mtrezza Dec 13, 2024
50b8671
Update ci.yml
mtrezza Dec 13, 2024
5bcc989
add .NET badge to README
mtrezza Dec 13, 2024
513955c
add compat table to README
mtrezza Dec 13, 2024
5623f88
Fixed LogOut Issues in Parse SDK itself.
YBTopaz8 Dec 17, 2024
d68e0b1
Merge branch 'Testt' of https://github.com/YBTopaz8/Parse-SDK-dotNET …
YBTopaz8 Dec 17, 2024
c694198
Fixed Test TargetFramework
YBTopaz8 Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions Parse/Abstractions/Platform/Objects/IObjectState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
using System.Collections.Generic;
using Parse.Platform.Objects;

namespace Parse.Abstractions.Platform.Objects
namespace Parse.Abstractions.Platform.Objects;

public interface IObjectState : IEnumerable<KeyValuePair<string, object>>
{
public interface IObjectState : IEnumerable<KeyValuePair<string, object>>
{
bool IsNew { get; }
string ClassName { get; }
string ObjectId { get; }
DateTime? UpdatedAt { get; }
DateTime? CreatedAt { get; }
object this[string key] { get; }
bool IsNew { get; }
string ClassName { get; set; }
string ObjectId { get; }
DateTime? UpdatedAt { get; }
DateTime? CreatedAt { get; }
object this[string key] { get; }

bool ContainsKey(string key);
bool ContainsKey(string key);

IObjectState MutatedClone(Action<MutableObjectState> func);
}
IObjectState MutatedClone(Action<MutableObjectState> func);
}
25 changes: 12 additions & 13 deletions Parse/Abstractions/Platform/Objects/IParseObjectClassController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@
using System.Collections.Generic;
using Parse.Abstractions.Infrastructure;

namespace Parse.Abstractions.Platform.Objects
namespace Parse.Abstractions.Platform.Objects;

public interface IParseObjectClassController
{
public interface IParseObjectClassController
{
string GetClassName(Type type);
string GetClassName(Type type);

Type GetType(string className);
Type GetType(string className);

bool GetClassMatch(string className, Type type);
bool GetClassMatch(string className, Type type);

void AddValid(Type type);
void AddValid(Type type);

void RemoveClass(Type type);
void RemoveClass(Type type);

void AddRegisterHook(Type type, Action action);
void AddRegisterHook(Type type, Action action);

ParseObject Instantiate(string className, IServiceHub serviceHub);
ParseObject Instantiate(string className, IServiceHub serviceHub);

IDictionary<string, string> GetPropertyMappings(string className);
IDictionary<string, string> GetPropertyMappings(string className);

void AddIntrinsic();
}
void AddIntrinsic();
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface IParseObjectController

Task<IObjectState> SaveAsync(IObjectState state, IDictionary<string, IParseFieldOperation> operations, string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);

IList<Task<IObjectState>> SaveAllAsync(IList<IObjectState> states, IList<IDictionary<string, IParseFieldOperation>> operationsList, string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IList<Task<IObjectState>>> SaveAllAsync(IList<IObjectState> states, IList<IDictionary<string, IParseFieldOperation>> operationsList, string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task DeleteAsync(IObjectState state, string sessionToken, CancellationToken cancellationToken = default);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,51 @@
using System.Threading.Tasks;
using Parse.Abstractions.Infrastructure;

namespace Parse.Abstractions.Platform.Objects
namespace Parse.Abstractions.Platform.Objects;

/// <summary>
/// <code>IParseObjectCurrentController</code> controls the single-instance <see cref="ParseObject"/>
/// persistence used throughout the code-base. Sample usages are <see cref="ParseUser.CurrentUser"/> and
/// <see cref="ParseInstallation.CurrentInstallation"/>.
/// </summary>
/// <typeparam name="T">Type of object being persisted.</typeparam>
public interface IParseObjectCurrentController<T> where T : ParseObject
{
/// <summary>
/// <code>IParseObjectCurrentController</code> controls the single-instance <see cref="ParseObject"/>
/// persistence used throughout the code-base. Sample usages are <see cref="ParseUser.CurrentUser"/> and
/// <see cref="ParseInstallation.CurrentInstallation"/>.
/// Persists current <see cref="ParseObject"/>.
/// </summary>
/// <typeparam name="T">Type of object being persisted.</typeparam>
public interface IParseObjectCurrentController<T> where T : ParseObject
{
/// <summary>
/// Persists current <see cref="ParseObject"/>.
/// </summary>
/// <param name="obj"><see cref="ParseObject"/> to be persisted.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task SetAsync(T obj, CancellationToken cancellationToken = default);
/// <param name="obj"><see cref="ParseObject"/> to be persisted.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task SetAsync(T obj, CancellationToken cancellationToken = default);

/// <summary>
/// Gets the persisted current <see cref="ParseObject"/>.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task<T> GetAsync(IServiceHub serviceHub, CancellationToken cancellationToken = default);
/// <summary>
/// Gets the persisted current <see cref="ParseObject"/>.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task<T> GetAsync(IServiceHub serviceHub, CancellationToken cancellationToken = default);

/// <summary>
/// Returns a <see cref="Task"/> that resolves to <code>true</code> if current
/// <see cref="ParseObject"/> exists.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task<bool> ExistsAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Returns a <see cref="Task"/> that resolves to <code>true</code> if current
/// <see cref="ParseObject"/> exists.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task<bool> ExistsAsync(CancellationToken cancellationToken = default);

/// <summary>
/// Returns <code>true</code> if the given <see cref="ParseObject"/> is the persisted current
/// <see cref="ParseObject"/>.
/// </summary>
/// <param name="obj">The object to check.</param>
/// <returns>true if <code>obj</code> is the current persisted <see cref="ParseObject"/>.</returns>
bool IsCurrent(T obj);
/// <summary>
/// Returns <code>true</code> if the given <see cref="ParseObject"/> is the persisted current
/// <see cref="ParseObject"/>.
/// </summary>
/// <param name="obj">The object to check.</param>
/// <returns>true if <code>obj</code> is the current persisted <see cref="ParseObject"/>.</returns>
bool IsCurrent(T obj);

/// <summary>
/// Nullifies the current <see cref="ParseObject"/> from memory.
/// </summary>
void ClearFromMemory();
/// <summary>
/// Nullifies the current <see cref="ParseObject"/> from memory.
/// </summary>
void ClearFromMemory();

/// <summary>
/// Clears current <see cref="ParseObject"/> from disk.
/// </summary>
void ClearFromDisk();
}
/// <summary>
/// Clears current <see cref="ParseObject"/> from disk.
/// </summary>
Task ClearFromDiskAsync();
}
15 changes: 7 additions & 8 deletions Parse/Abstractions/Platform/Sessions/IParseSessionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
using Parse.Abstractions.Infrastructure;
using Parse.Abstractions.Platform.Objects;

namespace Parse.Abstractions.Platform.Sessions
namespace Parse.Abstractions.Platform.Sessions;

public interface IParseSessionController
{
public interface IParseSessionController
{
Task<IObjectState> GetSessionAsync(string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IObjectState> GetSessionAsync(string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task RevokeAsync(string sessionToken, CancellationToken cancellationToken = default);
Task RevokeAsync(string sessionToken, CancellationToken cancellationToken = default);

Task<IObjectState> UpgradeToRevocableSessionAsync(string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IObjectState> UpgradeToRevocableSessionAsync(string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);

bool IsRevocableSessionToken(string sessionToken);
}
bool IsRevocableSessionToken(string sessionToken);
}
11 changes: 5 additions & 6 deletions Parse/Abstractions/Platform/Users/IParseCurrentUserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
using Parse.Abstractions.Infrastructure;
using Parse.Abstractions.Platform.Objects;

namespace Parse.Abstractions.Platform.Users
namespace Parse.Abstractions.Platform.Users;

public interface IParseCurrentUserController : IParseObjectCurrentController<ParseUser>
{
public interface IParseCurrentUserController : IParseObjectCurrentController<ParseUser>
{
Task<string> GetCurrentSessionTokenAsync(IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<string> GetCurrentSessionTokenAsync(IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task LogOutAsync(IServiceHub serviceHub, CancellationToken cancellationToken = default);
}
Task LogOutAsync(IServiceHub serviceHub, CancellationToken cancellationToken = default);
}
20 changes: 9 additions & 11 deletions Parse/Abstractions/Platform/Users/IParseUserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
using Parse.Abstractions.Infrastructure;
using Parse.Abstractions.Platform.Objects;

namespace Parse.Abstractions.Platform.Users
namespace Parse.Abstractions.Platform.Users;

public interface IParseUserController
{
public interface IParseUserController
{
Task<IObjectState> SignUpAsync(IObjectState state, IDictionary<string, IParseFieldOperation> operations, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IObjectState> SignUpAsync(IObjectState state, IDictionary<string, IParseFieldOperation> operations, IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task<IObjectState> LogInAsync(string username, string password, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IObjectState> LogInAsync(string username, string password, IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task<IObjectState> LogInAsync(string authType, IDictionary<string, object> data, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IObjectState> LogInAsync(string authType, IDictionary<string, object> data, IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task<IObjectState> GetUserAsync(string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);
Task<IObjectState> GetUserAsync(string sessionToken, IServiceHub serviceHub, CancellationToken cancellationToken = default);

Task RequestPasswordResetAsync(string email, CancellationToken cancellationToken = default);
Task RequestPasswordResetAsync(string email, CancellationToken cancellationToken = default);

bool RevocableSessionEnabled { get; set; }
bool RevocableSessionEnabled { get; set; }

object RevocableSessionEnabledMutex { get; }
}
}
Loading
Loading