summaryrefslogtreecommitdiff
path: root/Ivy/IvyPPC/IvyBindingAttribute.cs
diff options
context:
space:
mode:
authorfcolin2007-02-01 12:03:55 +0000
committerfcolin2007-02-01 12:03:55 +0000
commit98ab5d0164040427f7c554febae125686284e2a7 (patch)
treea6ab9c20fbf1172553d364c91447149e4dc72ab0 /Ivy/IvyPPC/IvyBindingAttribute.cs
parent531dfa4389ba34a0d32eed0ba8c82839e437d992 (diff)
downloadivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.zip
ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.tar.gz
ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.tar.bz2
ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.tar.xz
modification structure svn
Diffstat (limited to 'Ivy/IvyPPC/IvyBindingAttribute.cs')
-rw-r--r--Ivy/IvyPPC/IvyBindingAttribute.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/Ivy/IvyPPC/IvyBindingAttribute.cs b/Ivy/IvyPPC/IvyBindingAttribute.cs
deleted file mode 100644
index 90c44ce..0000000
--- a/Ivy/IvyPPC/IvyBindingAttribute.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace IvyBus
-{
- [AttributeUsage(AttributeTargets.Method,AllowMultiple = true)]
- public sealed class IvyBindingAttribute : Attribute
- {
- private string expression;
- private string[] args;
-
- // translate part of expression to object property
- public string GetExpression(object obj)
- {
- if (obj == null) return string.Format(expression);
- object[] values = new object[args.Length];
- for (int i = 0; i < args.Length; i++)
- {
- values[i] = obj.GetType().GetProperty(args[i]).GetValue(obj,null);
- }
- return string.Format(expression,values);
- }
-
- public IvyBindingAttribute(string expression, params string[] args)
- {
- this.expression = expression;
- this.args = args;
- }
- }
-}