Skip to content

Commit

Permalink
#4417 Fix issue with running on iOS, Android and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Bowman74 committed Dec 31, 2024
1 parent 32ec3ae commit 30710b0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Source/Csla/IChildDataPortalFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// </copyright>
// <summary>Implements a data portal service</summary>
//-----------------------------------------------------------------------
using System.Diagnostics.CodeAnalysis;

namespace Csla
{
/// <summary>
Expand All @@ -18,6 +20,10 @@ public interface IChildDataPortalFactory
/// Get a child data portal instance.
/// </summary>
/// <typeparam name="T">Child business object type</typeparam>
IChildDataPortal<T> GetPortal<T>();
IChildDataPortal<T> GetPortal<
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
#endif
T>();
}
}
8 changes: 7 additions & 1 deletion Source/Csla/IChildDataPortalT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
// <summary>Interface defining the members of the child data portal type</summary>
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;

namespace Csla
{
/// <summary>
/// Interface defining the members of the child data portal type.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IChildDataPortal<T>
public interface IChildDataPortal<
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
#endif
T>
{
/// <summary>
/// Starts an asynchronous data portal operation to
Expand Down
8 changes: 7 additions & 1 deletion Source/Csla/Server/ChildDataPortalFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// <summary>Implements a data portal service</summary>
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;

namespace Csla.Server
{
/// <summary>
Expand All @@ -29,7 +31,11 @@ public ChildDataPortalFactory(IServiceProvider serviceProvider)
/// Get a client-side data portal instance.
/// </summary>
/// <typeparam name="T">Root business object type</typeparam>
public IChildDataPortal<T> GetPortal<T>()
public IChildDataPortal<T> GetPortal<
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
#endif
T>()
{
return (IChildDataPortal<T>)ServiceProvider.GetService(typeof(IChildDataPortal<T>));
}
Expand Down

0 comments on commit 30710b0

Please sign in to comment.