blob: bcd483b14bc2b0918ff6a028bfe2e057bc588e62 (
plain)
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
|
using System;
using System.Collections.Generic;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Xamarin.Forms.Xaml;
namespace Xamarin.Forms.Build.Tasks
{
class ILContext
{
public ILContext(ILProcessor il, MethodBody body, ModuleDefinition module, FieldDefinition parentContextValues = null)
{
IL = il;
Body = body;
Values = new Dictionary<IValueNode, object>();
Variables = new Dictionary<IElementNode, VariableDefinition>();
Scopes = new Dictionary<INode, Tuple<VariableDefinition, IList<string>>>();
TypeExtensions = new Dictionary<INode, TypeReference>();
ParentContextValues = parentContextValues;
Module = module;
}
public Dictionary<IValueNode, object> Values { get; private set; }
public Dictionary<IElementNode, VariableDefinition> Variables { get; private set; }
public Dictionary<INode, Tuple<VariableDefinition, IList<string>>> Scopes { get; private set; }
public Dictionary<INode, TypeReference> TypeExtensions { get; }
public FieldDefinition ParentContextValues { get; private set; }
public object Root { get; set; } //FieldDefinition or VariableDefinition
public ILProcessor IL { get; private set; }
public MethodBody Body { get; private set; }
public ModuleDefinition Module { get; private set; }
}
}
|