/// <summary> /// Gets the property/field named <paramref name="name"/> /// </summary> /// <param name="name">Name of property/field</param> /// <param name="isField"><c>true</c> if it's a field, <c>false</c> if it's a property</param> /// <returns>A <see cref="CANamedArgument"/> instance or <c>null</c> if not found</returns> public CANamedArgument GetNamedArgument(string name, bool isField) { foreach (var namedArg in namedArguments.GetSafeEnumerable()) { if (namedArg.IsField == isField && UTF8String.ToSystemStringOrEmpty(namedArg.Name) == name) { return(namedArg); } } return(null); }
bool ContainsGenericParameter(ThreadSafe.IList <TypeSig> types) { if (types == null) { return(false); } if (!recursionCounter.Increment()) { return(false); } bool res = false; foreach (var type in types.GetSafeEnumerable()) { if (ContainsGenericParameter(type)) { res = true; break; } } recursionCounter.Decrement(); return(res); }