-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdatasrc.template.xml
41 lines (36 loc) · 1.35 KB
/
datasrc.template.xml
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
<?xml version="1.0" encoding="utf-8"?>
<CodeTemplates version="3.0">
<CodeTemplate version="2.0">
<Header>
<_Group>C#</_Group>
<Version />
<MimeType>text/x-csharp</MimeType>
<Shortcut>datasrc</Shortcut>
<_Description>fleshes out a ReactiveTableViewSource</_Description>
<TemplateType>Unknown</TemplateType>
</Header>
<Variables>
<Variable name="SomeClass">
<Default>ClassName</Default>
</Variable>
</Variables>
<Code><![CDATA[ public class $SomeClass$ListDataSource : ReactiveTableViewSource<ViewModels.$SomeClass$Cell>
{
// Constructors
public $SomeClass$ListDataSource(UITableView tableView)
: base(tableView)
{
}
public $SomeClass$ListDataSource(UITableView tableView, IReactiveNotifyCollectionChanged<ViewModels.$SomeClass$Cell> collection, NSString cellKey, float sizeHint, Action<UITableViewCell> initializeCellAction = null)
: base(tableView, collection, cellKey, sizeHint, initializeCellAction)
{
}
// Methods
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
var cell = (Cells.$SomeClass$Cell)tableView.CellAt(indexPath);
tableView.DeselectRow(indexPath, true);
}
}]]></Code>
</CodeTemplate>
</CodeTemplates>