maui-linux/Xamarin.Forms.Build.Tasks/ILContext.cs

43 строки
1.2 KiB
C#
Исходник Обычный вид История

using System;
2016-03-22 23:02:25 +03:00
using System.Collections.Generic;
2016-03-22 23:02:25 +03:00
using Mono.Cecil;
using Mono.Cecil.Cil;
2016-03-22 23:02:25 +03:00
using Xamarin.Forms.Xaml;
namespace Xamarin.Forms.Build.Tasks
{
class ILContext
{
public ILContext(ILProcessor il, MethodBody body, ModuleDefinition module, FieldDefinition parentContextValues = null)
2016-03-22 23:02:25 +03:00
{
IL = il;
Body = body;
Values = new Dictionary<IValueNode, object>();
Variables = new Dictionary<IElementNode, VariableDefinition>();
Scopes = new Dictionary<INode, Tuple<VariableDefinition, IList<string>>>();
2016-03-22 23:02:25 +03:00
TypeExtensions = new Dictionary<INode, TypeReference>();
ParentContextValues = parentContextValues;
Module = module;
2016-03-22 23:02:25 +03:00
}
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; }
2016-03-22 23:02:25 +03:00
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; }
2016-03-22 23:02:25 +03:00
}
}