Skip to content

Commit

Permalink
Feature/4417 data portal annotations (#4419)
Browse files Browse the repository at this point in the history
* #4417 Changes for data portal annotations

* #4417 Fix spacing
  • Loading branch information
Bowman74 authored Dec 30, 2024
1 parent 3627af7 commit 6905ebc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
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

0 comments on commit 6905ebc

Please sign in to comment.