Skip to content
12 changes: 6 additions & 6 deletions Source/Csla.Blazor/State/NoOpSessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public Session GetCachedSession()
/// <exception cref="NotSupportedException"></exception>
public Session GetSession()
{ throw new NotSupportedException(); }
/// <summary>
/// Not supported
/// </summary>
/// <returns></returns>
/// <exception cref="NotSupportedException"></exception>
public void PurgeSessions(TimeSpan expiration)
/// <summary>
/// Not supported.
/// </summary>
/// <param name="expiration">Unused expiration value.</param>
/// <exception cref="NotSupportedException"></exception>
public void PurgeSessions(TimeSpan expiration)
{ throw new NotSupportedException(); }
/// <summary>
/// Not supported
Expand Down
18 changes: 15 additions & 3 deletions Source/Csla.Blazor/State/StateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,29 @@
// <summary>Get and save state from Blazor pages</summary>
//-----------------------------------------------------------------------

using System;
using System.Threading;
using System.Threading.Tasks;
using Csla.State;

namespace Csla.Blazor.State
{
/// <summary>
/// Get and save state from Blazor pages.
/// </summary>
/// <param name="sessionManager">The session manager to use for state management.</param>
public class StateManager(ISessionManager sessionManager)
public class StateManager
{
private readonly ISessionManager _sessionManager = sessionManager;
private readonly ISessionManager _sessionManager;

/// <summary>
/// Initializes a new instance of the <see cref="StateManager"/> class.
/// </summary>
/// <param name="sessionManager">Session manager implementation used to persist page state.</param>
/// <exception cref="ArgumentNullException"><paramref name="sessionManager"/> is <see langword="null"/>.</exception>
public StateManager(ISessionManager sessionManager)
{
_sessionManager = sessionManager ?? throw new ArgumentNullException(nameof(sessionManager));
}

/// <summary>
/// Get state from cache.
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla.Web/Design/CslaDesignerDataSourceView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public override IEnumerable GetDesignTimeData(int minimumRows, out bool isSample
/// </summary>
/// <remarks>
/// All public properties are returned except for those marked
/// with the <see cref="BrowsableAttribute">Browsable attribute</see>
/// with the <c>System.ComponentModel.BrowsableAttribute</c>
/// as False.
/// </remarks>
public override IDataSourceViewSchema Schema =>
Expand Down
8 changes: 4 additions & 4 deletions Source/Csla.Web/Design/ObjectFieldInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public ObjectFieldInfo(PropertyDescriptor field)
/// </summary>
/// <remarks>
/// Returns the optional value provided through
/// the <see cref="DataObjectFieldAttribute">DataObjectField</see>
/// the <c>System.ComponentModel.DataObjectFieldAttribute</c>
/// attribute on the property.
/// </remarks>
public bool Identity { get; }
Expand All @@ -93,7 +93,7 @@ public ObjectFieldInfo(PropertyDescriptor field)
/// </summary>
/// <remarks>
/// Returns the optional value provided through
/// the <see cref="DataObjectFieldAttribute">DataObjectField</see>
/// the <c>System.ComponentModel.DataObjectFieldAttribute</c>
/// attribute on the property.
/// </remarks>
public int Length { get; }
Expand All @@ -111,7 +111,7 @@ public ObjectFieldInfo(PropertyDescriptor field)
/// Returns True for reference types, and for
/// value types wrapped in the Nullable generic.
/// The result can also be set to True through
/// the <see cref="DataObjectFieldAttribute">DataObjectField</see>
/// the <c>System.ComponentModel.DataObjectFieldAttribute</c>
/// attribute on the property.
/// </remarks>
public bool Nullable { get; }
Expand All @@ -128,7 +128,7 @@ public ObjectFieldInfo(PropertyDescriptor field)
/// </summary>
/// <remarks>
/// Returns the optional value provided through
/// the <see cref="DataObjectFieldAttribute">DataObjectField</see>
/// the <c>System.ComponentModel.DataObjectFieldAttribute</c>
/// attribute on the property.
/// </remarks>
public bool PrimaryKey => IsUnique;
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla.Web/Design/ObjectViewSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public ObjectViewSchema(CslaDataSourceDesigner? site, string typeName)
/// <remarks>All public properties on the object
/// will be reflected in this schema list except
/// for those properties where the
/// <see cref="BrowsableAttribute">Browsable</see> attribute
/// <c>System.ComponentModel.BrowsableAttribute</c>
/// is False.
/// </remarks>
public IDataSourceFieldSchema[] GetFields()
Expand Down
17 changes: 13 additions & 4 deletions Source/Csla/Configuration/Fluent/DataPortalServerOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// <summary>Server-side data portal options.</summary>
//-----------------------------------------------------------------------

using System;
using System.Diagnostics.CodeAnalysis;
using Csla.Server;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -15,14 +16,22 @@ namespace Csla.Configuration
/// <summary>
/// Server-side data portal options.
/// </summary>
/// <param name="services">Service collection.</param>
/// <exception cref="ArgumentNullException"><paramref name="services"/> is <see langword="null"/>.</exception>
public class DataPortalServerOptions(IServiceCollection services)
public class DataPortalServerOptions
{
/// <summary>
/// Initializes a new instance of the <see cref="DataPortalServerOptions"/> class.
/// </summary>
/// <param name="services">Service collection.</param>
/// <exception cref="ArgumentNullException"><paramref name="services"/> is <see langword="null"/>.</exception>
public DataPortalServerOptions(IServiceCollection services)
{
Services = services ?? throw new ArgumentNullException(nameof(services));
}

/// <summary>
/// Gets the service collection.
/// </summary>
public IServiceCollection Services{ get; } = services ?? throw new ArgumentNullException(nameof(services));
public IServiceCollection Services { get; }

/// <summary>
/// Gets or sets a value containing the type of the
Expand Down
18 changes: 10 additions & 8 deletions Source/Csla/DataPortalT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public DataPortal(ApplicationContext applicationContext, IDataPortalProxy proxy,
_dataPortalClientOptions = dataPortalOptions.DataPortalClientOptions;
}

/// @cond INTERNAL
private class DataPortalAsyncRequest
{
private ApplicationContext _applicationContext;
Expand Down Expand Up @@ -90,6 +91,7 @@ public DataPortalAsyncResult(T result, Exception error, object userState)
}
}

/// @endcond
private Reflection.ServiceProviderMethodCaller? _serviceProviderMethodCaller;
private Reflection.ServiceProviderMethodCaller ServiceProviderMethodCaller
{
Expand Down Expand Up @@ -627,10 +629,10 @@ public T CreateChild()
}

/// <inheritdoc />
public T CreateChild(params object?[]? parameters)
public T CreateChild(params object?[]? criteria)
{
var portal = new Server.ChildDataPortal(_applicationContext);
return (T)(portal.Create(typeof(T), parameters));
return (T)(portal.Create(typeof(T), criteria));
}

/// <summary>
Expand All @@ -644,10 +646,10 @@ public async Task<T> CreateChildAsync()
}

/// <inheritdoc />
public async Task<T> CreateChildAsync(params object?[]? parameters)
public async Task<T> CreateChildAsync(params object?[]? criteria)
{
var portal = new Server.ChildDataPortal(_applicationContext);
return await portal.CreateAsync<T>(parameters);
return await portal.CreateAsync<T>(criteria);
}

/// <summary>
Expand All @@ -661,10 +663,10 @@ public T FetchChild()
}

/// <inheritdoc />
public T FetchChild(params object?[]? parameters)
public T FetchChild(params object?[]? criteria)
{
var portal = new Server.ChildDataPortal(_applicationContext);
return (T)(portal.Fetch(typeof(T), parameters));
return (T)(portal.Fetch(typeof(T), criteria));
}

/// <summary>
Expand All @@ -678,10 +680,10 @@ public async Task<T> FetchChildAsync()
}

/// <inheritdoc />
public async Task<T> FetchChildAsync(params object?[]? parameters)
public async Task<T> FetchChildAsync(params object?[]? criteria)
{
var portal = new Server.ChildDataPortal(_applicationContext);
return await portal.FetchAsync<T>(parameters);
return await portal.FetchAsync<T>(criteria);
}

/// <inheritdoc />
Expand Down
4 changes: 3 additions & 1 deletion Source/Csla/FilteredBindingList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,9 @@ public T this[int index]
private IBindingList? _bindingList;
private object? _filter;

private readonly List<ListItem> _filterIndex = [];
/// @cond DOXYGEN_IGNORE
private readonly List<ListItem> _filterIndex = new();
/// @endcond

/// <summary>
/// Creates a new view based on the provided IList object.
Expand Down
3 changes: 1 addition & 2 deletions Source/Csla/IChildDataPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public interface IChildDataPortal
/// to use this new object.
/// </remarks>
/// <param name="obj">A reference to the business object to be updated.</param>
/// <param name="parameters"></param>
/// <returns>A reference to the updated business object.</returns>
/// <param name="parameters">Optional arguments passed to child update methods.</param>
/// <exception cref="ArgumentNullException"><paramref name="obj"/> is <see langword="null"/>.</exception>
void UpdateChild(object obj, params object?[]? parameters);
}
Expand Down
17 changes: 8 additions & 9 deletions Source/Csla/IChildDataPortalT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public interface IChildDataPortal<[DynamicallyAccessedMembers(DynamicallyAccesse
/// Called by a factory method in a business class or
/// by the UI to update an object.
/// </summary>
/// <param name="obj">Object to update.</param>
/// <param name="parameters">Additional, optional parameters to pass</param>
/// /// <exception cref="ArgumentNullException"><paramref name="obj"/> is <see langword="null"/>.</exception>
Task UpdateChildAsync(T obj, params object?[]? parameters);
/// <param name="child">Object to update.</param>
/// <param name="parameters">Additional, optional parameters to pass.</param>
/// <exception cref="ArgumentNullException"><paramref name="child"/> is <see langword="null"/>.</exception>
Task UpdateChildAsync(T child, params object?[]? parameters);
/// <summary>
/// Called by a factory method in a business class to create
/// a new object, which is loaded with default
Expand All @@ -65,10 +65,9 @@ public interface IChildDataPortal<[DynamicallyAccessedMembers(DynamicallyAccesse
/// different object from the original, and all object references MUST be updated
/// to use this new object.
/// </remarks>
/// <param name="obj">A reference to the business object to be updated.</param>
/// <param name="parameters"></param>
/// <returns>A reference to the updated business object.</returns>
/// <exception cref="ArgumentNullException"><paramref name="obj"/> is <see langword="null"/>.</exception>
void UpdateChild(T obj, params object?[]? parameters);
/// <param name="child">A reference to the business object to be updated.</param>
/// <param name="parameters">Optional arguments passed to child update methods.</param>
/// <exception cref="ArgumentNullException"><paramref name="child"/> is <see langword="null"/>.</exception>
void UpdateChild(T child, params object?[]? parameters);
}
}
2 changes: 1 addition & 1 deletion Source/Csla/LazySingleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public LazySingleton()
/// Initializes a new instance of the <see cref="LazySingleton&lt;T&gt;"/> class.
/// Will call the supplied delegate to create an instance of T (the value)
/// </summary>
/// <param name="delegate">The @delegate.</param>
/// <param name="delegate">Factory delegate used to create the singleton value.</param>
/// <exception cref="ArgumentNullException"><paramref name="delegate"/> is <see langword="null"/>.</exception>
public LazySingleton(Func<T> @delegate)
{
Expand Down
6 changes: 0 additions & 6 deletions Source/Csla/Server/GenericBusinessException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ public class GenericBusinessException : Exception
/// </summary>
/// <value></value>
/// <returns>A string that describes the immediate frames of the call stack.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" PathDiscovery="*AllFiles*"/>
/// </PermissionSet>
public override string StackTrace { get; }

/// <summary>
Expand Down Expand Up @@ -78,9 +75,6 @@ public GenericBusinessException(Exception wrappedException, Exception innerExcep
/// <returns>
/// A <see cref="System.String"/> that represents this instance.
/// </returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" PathDiscovery="*AllFiles*"/>
/// </PermissionSet>
public override string ToString()
{
string className;
Expand Down
4 changes: 2 additions & 2 deletions Source/Csla/Server/ObjectFactoryLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ObjectFactoryLoader(ApplicationContext applicationContext)
/// on the business object.
/// </param>
/// <exception cref="ArgumentException"><paramref name="factoryName"/> is <see langword="null"/>, <see cref="string.Empty"/> or only consists of white spaces.</exception>
/// <exception cref="InvalidOperationException"><see cref="Type"/> for <paramref name="factoryName"/> could not be loaded.</exception>
/// <exception cref="InvalidOperationException"><c>System.Type</c> for <paramref name="factoryName"/> could not be loaded.</exception>
public Type GetFactoryType(string factoryName)
{
if (factoryName is null)
Expand All @@ -62,7 +62,7 @@ public Type GetFactoryType(string factoryName)
/// type name parameter.
/// </returns>
/// <exception cref="ArgumentException"><paramref name="factoryName"/> is <see langword="null"/>, <see cref="string.Empty"/> or only consists of white spaces.</exception>
/// <exception cref="InvalidOperationException"><see cref="Type"/> for <paramref name="factoryName"/> could not be loaded.</exception>
/// <exception cref="InvalidOperationException"><c>System.Type</c> for <paramref name="factoryName"/> could not be loaded.</exception>
public object GetFactory(string factoryName)
{
if (factoryName is null)
Expand Down
6 changes: 3 additions & 3 deletions Source/Csla/Server/ServicedDataPortalReadCommitted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ServicedDataPortalReadCommitted(DataPortalBroker dataPortalBroker)
/// but wraps that call within a COM+ transaction
/// to provide transactional support.
/// </remarks>
/// <param name="objectType">A <see cref="Type">Type</see> object
/// <param name="objectType">A <c>System.Type</c> object
/// indicating the type of business object to be created.</param>
/// <param name="criteria">A custom criteria object providing any
/// extra information that may be required to properly create
Expand All @@ -66,7 +66,7 @@ public Task<DataPortalResult> Create(Type objectType, object criteria, DataPorta
/// but wraps that call within a COM+ transaction
/// to provide transactional support.
/// </remarks>
/// <param name="objectType">Type of business object to retrieve.</param>
/// <param name="objectType">Type of business object to retrieve.</param>
/// <param name="criteria">Object-specific criteria.</param>
/// <param name="context">Object containing context data from client.</param>
/// <param name="isSync">True if the client-side proxy should synchronously invoke the server.</param>
Expand Down Expand Up @@ -107,7 +107,7 @@ public Task<DataPortalResult> Update(object obj, DataPortalContext context, bool
/// but wraps that call within a COM+ transaction
/// to provide transactional support.
/// </remarks>
/// <param name="objectType">Type of business object to create.</param>
/// <param name="objectType">Type of business object to create.</param>
/// <param name="criteria">Object-specific criteria.</param>
/// <param name="context">Context data from the client.</param>
/// <param name="isSync">True if the client-side proxy should synchronously invoke the server.</param>
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla/Server/ServicedDataPortalReadUncommitted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ServicedDataPortalReadUncommitted(DataPortalBroker dataPortalBroker)
/// but wraps that call within a COM+ transaction
/// to provide transactional support.
/// </remarks>
/// <param name="objectType">A <see cref="Type">Type</see> object
/// <param name="objectType">A <c>System.Type</c> object
/// indicating the type of business object to be created.</param>
/// <param name="criteria">A custom criteria object providing any
/// extra information that may be required to properly create
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla/Server/ServicedDataPortalRepeatableRead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ServicedDataPortalRepeatableRead(DataPortalBroker dataPortalBroker)
/// but wraps that call within a COM+ transaction
/// to provide transactional support.
/// </remarks>
/// <param name="objectType">A <see cref="Type">Type</see> object
/// <param name="objectType">A <c>System.Type</c> object
/// indicating the type of business object to be created.</param>
/// <param name="criteria">A custom criteria object providing any
/// extra information that may be required to properly create
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla/Server/ServicedDataPortalSerializable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ServicedDataPortalSerializable(DataPortalBroker dataPortalBroker)
/// but wraps that call within a COM+ transaction
/// to provide transactional support.
/// </remarks>
/// <param name="objectType">A <see cref="Type">Type</see> object
/// <param name="objectType">A <c>System.Type</c> object
/// indicating the type of business object to be created.</param>
/// <param name="criteria">A custom criteria object providing any
/// extra information that may be required to properly create
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla/Server/TransactionalDataPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public TransactionalDataPortal(DataPortalBroker dataPortalBroker, TransactionalA
/// to provide transactional support via
/// System.Transactions.
/// </remarks>
/// <param name="objectType">A <see cref="Type">Type</see> object
/// <param name="objectType">A <c>System.Type</c> object
/// indicating the type of business object to be created.</param>
/// <param name="criteria">A custom criteria object providing any
/// extra information that may be required to properly create
Expand Down
4 changes: 3 additions & 1 deletion Source/Csla/SortedBindingList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,9 @@ public T this[int index]
private IBindingList? _bindingList;
private bool _initiatedLocally;

private readonly List<ListItem> _sortIndex = [];
/// @cond DOXYGEN_IGNORE
private readonly List<ListItem> _sortIndex = new();
/// @endcond

/// <summary>
/// Creates a new view based on the provided IList object.
Expand Down
Loading
Loading