Mono.Debugger.Soft.TypeMirror.GetCAttrs C# (CSharp) Method

GetCAttrs() private method

private GetCAttrs ( TypeMirror type, bool inherit ) : CustomAttributeDataMirror[]
type TypeMirror
inherit bool
return CustomAttributeDataMirror[]
		CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
			// FIXME: Handle inherit
			if (cattrs == null) {
				CattrInfo[] info = vm.conn.Type_GetCustomAttributes (id, 0, false);
				cattrs = CustomAttributeDataMirror.Create (vm, info);
			}
			var res = new List<CustomAttributeDataMirror> ();
			foreach (var attr in cattrs)
				if (type == null || attr.Constructor.DeclaringType == type)
					res.Add (attr);
			return res.ToArray ();
		}