зеркало из https://github.com/microsoft/prepose.git
[PreposeGesturesDatabase]
Set AvailableGestures and AvailableGesturesCount setters as private Add Constructor overload that allows a lambda expression Add Static constructor to allow building database from plain text
This commit is contained in:
Родитель
7a60cfd864
Коммит
1f86b92232
|
@ -21,8 +21,19 @@ namespace PreposeGestures
|
|||
AvailableGestures = (IReadOnlyList<Gesture>)parsedPreposeCode.Gestures;
|
||||
}
|
||||
|
||||
public IReadOnlyList<Gesture> AvailableGestures { get; set; }
|
||||
public uint AvailableGesturesCount { get; set; }
|
||||
public PreposeGesturesDatabase(Func<PreposeGestures.App> preposeGestureAppFunc)
|
||||
{
|
||||
parsedPreposeCode = preposeGestureAppFunc();
|
||||
AvailableGestures = (IReadOnlyList<Gesture>)parsedPreposeCode.Gestures;
|
||||
}
|
||||
|
||||
public static PreposeGesturesDatabase FromText(string text)
|
||||
{
|
||||
return new PreposeGesturesDatabase(() => PreposeGestures.App.ReadAppText(text));
|
||||
}
|
||||
|
||||
public IReadOnlyList<Gesture> AvailableGestures { get; private set; }
|
||||
public uint AvailableGesturesCount { get; private set; }
|
||||
}
|
||||
|
||||
public sealed class DiscreteGestureResult : IDisposable
|
||||
|
|
Загрузка…
Ссылка в новой задаче