static ParameterDirection GetDirection(ParameterInfo paramInfo, ParameterAttribute paramAttrib) { //strange hack to determine what's a ref, out parameter: //http://lists.ximian.com/pipermain/mono-list/2003-March/012751.html bool hasAmpersand = paramInfo.ParameterType.FullName.Contains('&'); if (paramInfo.IsOut) return ParameterDirection.Output; if (hasAmpersand) return ParameterDirection.InputOutput; return ParameterDirection.Input; }
public AttributedMetaParameter(ParameterInfo parameterInfo) { this.parameterInfo = parameterInfo; this.paramAttrib = Attribute.GetCustomAttribute(parameterInfo, typeof(ParameterAttribute), false) as ParameterAttribute; }