-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDataAccessCommand.cs
More file actions
71 lines (65 loc) · 2.69 KB
/
DataAccessCommand.cs
File metadata and controls
71 lines (65 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using RapidField.SolidInstruments.Core;
using System;
using System.Diagnostics;
using System.Runtime.Serialization;
using SolidInstrumentsCommand = RapidField.SolidInstruments.Command.Command;
namespace RapidField.SolidInstruments.DataAccess
{
/// <summary>
/// Represents a data access command that emits a result when processed.
/// </summary>
/// <remarks>
/// <see cref="DataAccessCommand{TResult}" /> is the default implementation of <see cref="IDataAccessCommand{TResult}" />.
/// </remarks>
/// <typeparam name="TResult">
/// The type of the result that is produced by handling the data access command.
/// </typeparam>
[DataContract]
public abstract class DataAccessCommand<TResult> : DataAccessCommand, IDataAccessCommand<TResult>
{
/// <summary>
/// Initializes a new instance of the <see cref="DataAccessCommand{TResult}" /> class.
/// </summary>
protected DataAccessCommand()
: base()
{
return;
}
/// <summary>
/// Gets the type of the result that is produced by handling the data access command.
/// </summary>
[IgnoreDataMember]
public sealed override Type ResultType => ResultTypeReference;
/// <summary>
/// Represents the type of the result that is produced by handling the data access command.
/// </summary>
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
private static readonly Type ResultTypeReference = typeof(TResult);
}
/// <summary>
/// Represents a data access command.
/// </summary>
/// <remarks>
/// <see cref="DataAccessCommand" /> is the default implementation of <see cref="IDataAccessCommand" />.
/// </remarks>
[DataContract]
public abstract class DataAccessCommand : SolidInstrumentsCommand, IDataAccessCommand
{
/// <summary>
/// Initializes a new instance of the <see cref="DataAccessCommand" /> class.
/// </summary>
protected DataAccessCommand()
: base()
{
return;
}
/// <summary>
/// Gets the type of the result that is produced by processing the data access command.
/// </summary>
[IgnoreDataMember]
public override Type ResultType => Nix.Type;
}
}