IronRuby.Runtime.Calls.MetaObjectBuilder.AddRuntimeTest C# (CSharp) Méthode

AddRuntimeTest() private méthode

private AddRuntimeTest ( DynamicMetaObject metaContext ) : void
metaContext System.Dynamic.DynamicMetaObject
Résultat void
        private void AddRuntimeTest(DynamicMetaObject/*!*/ metaContext) {
            Assert.NotNull(metaContext);

            // check for runtime (note that the module's runtime could be different from the call-site runtime):
            if (_siteContext == null) {
                // TODO: use holder
                AddRestriction(Ast.Equal(metaContext.Expression, AstUtils.Constant(metaContext.Value)));
            } else if (_siteContext != metaContext.Value) {
                throw new InvalidOperationException("Runtime-bound site called from a different runtime");
            }
        }