コード例 #1
0
ファイル: TotemMethod.cs プロジェクト: Alxandr/IronTotem
        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;
        }
コード例 #2
0
ファイル: Generator.cs プロジェクト: Alxandr/IronTotem
 static IEnumerable<object> Map(IEnumerable target, ITotemCallable action)
 {
     return Objectify(target).Select(obj => action.Invoke(obj));
 }
コード例 #3
0
ファイル: Generator.cs プロジェクト: Alxandr/IronTotem
 static void Each(IEnumerable target, ITotemCallable action)
 {
     foreach (var t in target)
         action.Invoke(t);
 }
コード例 #4
0
ファイル: TotemType.cs プロジェクト: Alxandr/IronTotem
 private void Implement(string name, ITotemCallable callable)
 {
     _customProperties.Add(name, new CustomProperty(
         obj => new TotemMethod(_context, name, callable, obj),
         null
     ));
 }
コード例 #5
0
ファイル: TotemType.cs プロジェクト: Alxandr/IronTotem
 static void Implement(TotemType target, string name, ITotemCallable callable)
 {
     target.Implement(name, callable);
 }
コード例 #6
0
ファイル: TotemMethod.cs プロジェクト: Alxandr/IronTotem
 internal static TotemMethod Create(TotemContext/*!*/ context, string name, ITotemCallable wrapped, object/*!*/ instance)
 {
     return new TotemMethod(context, name, wrapped, instance);
 }