|
DataContextCustomTableOperationTokens Property
|
Namespace: GSF.Web.ModelAssembly: GSF.Web (in GSF.Web.dll) Version: 2.4.248-beta
Syntaxpublic Dictionary<Type, IEnumerable<KeyValuePair<string, string>>> CustomTableOperationTokens { get; }
Public ReadOnly Property CustomTableOperationTokens As Dictionary(Of Type, IEnumerable(Of KeyValuePair(Of String, String)))
Get
public:
property Dictionary<Type^, IEnumerable<KeyValuePair<String^, String^>>^>^ CustomTableOperationTokens {
Dictionary<Type^, IEnumerable<KeyValuePair<String^, String^>>^>^ get ();
}
member CustomTableOperationTokens : Dictionary<Type, IEnumerable<KeyValuePair<string, string>>> with get
function get_CustomTableOperationTokens();
View SourceProperty Value
DictionaryType,
IEnumerableKeyValuePairString,
String
Remarks
The returned dictionary can be used to apply run-time tokens to any defined
AmendExpressionAttribute values,
for example, given the following amendment expression applied to a modeled class:
[AmendExpression("TOP {count}",
TargetExpression = TargetExpression.FieldList,
AffixPosition = AffixPosition.Prefix,
StatementTypes = StatementTypes.SelectSet)]]
public class MyTable
{
string MyField;
}
The per-model key/value pairs could be set as follows at run-time:
int count = 200;
dataContext.CustomTableOperationTokens[typeof(MyTable)] = new[] { new KeyValuePair<string, string>("{count}", $"{count}") };
See Also