diff options
author | fcolin | 2007-02-01 11:59:19 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 11:59:19 +0000 |
commit | 31a4ba441a313dca7821cae97378ac77b90068cc (patch) | |
tree | 0a1ce34e3217d3810cff6d86c8d7e215b783975c /CSharp/Ivy/IvyPPC/IvyBindingAttribute.cs | |
parent | cbf21e890ed2df9dc964bd017b48da8e94e2c608 (diff) | |
download | ivy-csharp-31a4ba441a313dca7821cae97378ac77b90068cc.zip ivy-csharp-31a4ba441a313dca7821cae97378ac77b90068cc.tar.gz ivy-csharp-31a4ba441a313dca7821cae97378ac77b90068cc.tar.bz2 ivy-csharp-31a4ba441a313dca7821cae97378ac77b90068cc.tar.xz |
suppression niveaux
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyBindingAttribute.cs')
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyBindingAttribute.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyBindingAttribute.cs b/CSharp/Ivy/IvyPPC/IvyBindingAttribute.cs deleted file mode 100644 index 90c44ce..0000000 --- a/CSharp/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;
- }
- }
-}
|