Ejemplo n.º 1
0
 public override void DeclareVar(string Name, Type BaseT)
 {
     if (ScopeVariables.Any(x => __GetName(x) == Name))
     {
         return;
     }
     ScopeVariables.Add(Expression.MakeIndex(
                            Expression.MakeMemberAccess(
                                ThisAccess
                                , VariablesField),
                            VariablesField.FieldType.GetRuntimeProperty("Item"),
                            new Expression[] { Expression.Constant(Name, typeof(string)) }));
 }
Ejemplo n.º 2
0
 public override void DeclareVar(string Name, Type BaseT)
 {
     ScopeVariables.Add(
         Expression.MakeMemberAccess(null,
                                     Destination.DefineField(Name, BaseT, System.Reflection.FieldAttributes.Public | System.Reflection.FieldAttributes.Static)));
 }