Small warning fix

This commit is contained in:
2026-02-26 15:27:01 +01:00
parent d4dc0143d4
commit 4d5bebba07
2 changed files with 18 additions and 22 deletions

View File

@@ -51,11 +51,11 @@ namespace DynamORM
/// public class ProcResult { [Column("outp")] public Guid Output { get; set; } }
/// ProcResult res4 = db.Procedures.sp_Test_Scalar_In_Out<ProcResult>(inp: Guid.NewGuid(), out_outp: Guid.Empty) as ProcResult;
/// </code>As you can se, you can use mapper to do job for you.</example>
public class DynamicProcedureInvoker : DynamicObject, IDisposable
{
private DynamicDatabase _db;
private List<string> _prefixes;
private bool _isDisposed;
public class DynamicProcedureInvoker : DynamicObject, IDisposable
{
private DynamicDatabase _db;
private List<string> _prefixes;
private bool _isDisposed;
internal DynamicProcedureInvoker(DynamicDatabase db, List<string> prefixes = null)
{
@@ -314,8 +314,6 @@ namespace DynamORM
Type listType = typeof(List<>).MakeGenericType(new Type[] { argType });
IList listInstance = (IList)Activator.CreateInstance(listType);
object defVal = listType.GetDefaultValue();
using (IDataReader rdr = cmd.ExecuteReader())
using (IDataReader cache = rdr.CachedReader())
while (cache.Read())
@@ -447,16 +445,16 @@ namespace DynamORM
return true;
}
/// <summary>Performs application-defined tasks associated with
/// freeing, releasing, or resetting unmanaged resources.</summary>
public void Dispose()
{
if (_isDisposed)
return;
_isDisposed = true;
_db = null;
_prefixes = null;
}
}
}
/// <summary>Performs application-defined tasks associated with
/// freeing, releasing, or resetting unmanaged resources.</summary>
public void Dispose()
{
if (_isDisposed)
return;
_isDisposed = true;
_db = null;
_prefixes = null;
}
}
}