diff options
author | fcolin | 2007-02-01 12:04:16 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 12:04:16 +0000 |
commit | 92757a8d629812303ff3665343bd098917cca611 (patch) | |
tree | cd995c9863aa6fc4c32ec5ce247e4c3119eb44a3 /IvyToDel/Ivy/IvyBindingAttribute.cs | |
parent | 98ab5d0164040427f7c554febae125686284e2a7 (diff) | |
download | ivy-csharp-92757a8d629812303ff3665343bd098917cca611.zip ivy-csharp-92757a8d629812303ff3665343bd098917cca611.tar.gz ivy-csharp-92757a8d629812303ff3665343bd098917cca611.tar.bz2 ivy-csharp-92757a8d629812303ff3665343bd098917cca611.tar.xz |
modification structure svn
Diffstat (limited to 'IvyToDel/Ivy/IvyBindingAttribute.cs')
-rw-r--r-- | IvyToDel/Ivy/IvyBindingAttribute.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/IvyToDel/Ivy/IvyBindingAttribute.cs b/IvyToDel/Ivy/IvyBindingAttribute.cs deleted file mode 100644 index 90c44ce..0000000 --- a/IvyToDel/Ivy/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;
- }
- }
-}
|