Esempio n. 1
0
        public TotemMethod(TotemContext/*!*/ context, string name, ITotemCallable wrapped, object instance)
            : base(context.GetType<Types.Method>())
        {
            ContractUtils.RequiresNotNull(wrapped, "wrapped");
            ContractUtils.RequiresNotNull(instance, "instance");

            _wrapped = wrapped;
            _name = name;
            _instance = instance;
        }
Esempio n. 2
0
 static IEnumerable<object> Map(IEnumerable target, ITotemCallable action)
 {
     return Objectify(target).Select(obj => action.Invoke(obj));
 }
Esempio n. 3
0
 static void Each(IEnumerable target, ITotemCallable action)
 {
     foreach (var t in target)
         action.Invoke(t);
 }
Esempio n. 4
0
 private void Implement(string name, ITotemCallable callable)
 {
     _customProperties.Add(name, new CustomProperty(
         obj => new TotemMethod(_context, name, callable, obj),
         null
     ));
 }
Esempio n. 5
0
 static void Implement(TotemType target, string name, ITotemCallable callable)
 {
     target.Implement(name, callable);
 }
Esempio n. 6
0
 internal static TotemMethod Create(TotemContext/*!*/ context, string name, ITotemCallable wrapped, object/*!*/ instance)
 {
     return new TotemMethod(context, name, wrapped, instance);
 }