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

Feature/4417 data portal annotations #4419

Merged
merged 2 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion Source/Csla/DataPortalClient/DataPortalFactory.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.DataPortalClient
{
/// <summary>
Expand All @@ -29,7 +31,11 @@ public DataPortalFactory(IServiceProvider serviceProvider)
/// Get a client-side data portal instance.
/// </summary>
/// <typeparam name="T">Root business object type</typeparam>
public IDataPortal<T> GetPortal<T>()
public IDataPortal<T> GetPortal<
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
#endif
T>()
{
return (IDataPortal<T>)ServiceProvider.GetService(typeof(IDataPortal<T>));
}
Expand Down
8 changes: 7 additions & 1 deletion Source/Csla/IDataPortalFactory.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 IDataPortalFactory
/// Get a client-side data portal instance.
/// </summary>
/// <typeparam name="T">Root business object type</typeparam>
IDataPortal<T> GetPortal<T>();
IDataPortal<T> GetPortal<
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
#endif
T>();
}
}
8 changes: 7 additions & 1 deletion Source/Csla/IDataPortalT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
// <summary>Interface defining the members of the data portal type</summary>
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;

namespace Csla
{
/// <summary>
/// Interface defining the members of the data portal type.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IDataPortal<T>
public interface IDataPortal<
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
# endif
T>
{
/// <summary>
/// Starts an asynchronous data portal operation to
Expand Down