public static void SetupFixture(TestContext testContext) { var typeSystemBuilder = new TypeSystemBuilder(); typeSystemBuilder.AddType <A>("A", "stuff").AddForeignProperty(IdDelimiter.Dot, "b", a => a.b); typeSystemBuilder.AddType <B>("B", "stuff 2").AddForeignProperty(IdDelimiter.Dot, "c", a => a.c); context = new EvaluationScope(typeSystemBuilder.Build()); context.DefineVariable("a", new A() { b = new B() { c = 1 } }); }
/// <summary> /// Define THIS. /// </summary> /// <param name="this"></param> /// <param name="value"></param> /// <returns></returns> public static IVariableDefinition DefineThis(this IEvaluationScope @this, object value) { return(@this.DefineVariable(ThisName, value)); }