wasSharp
/Reflection.cs |
---|
@@ -124,7 +124,7 @@ |
.AsParallel().SelectMany(f => f.GetCustomAttributes( |
typeof(NameAttribute), false), ( |
f, a) => new {Field = f, Att = a}) |
.SingleOrDefault(a => Strings.StringEquals(((NameAttribute) a.Att) |
.SingleOrDefault(a => String.Equals(((NameAttribute) a.Att) |
.Name, name, comparison)); |
return field != null ? (T) field.Field.GetValue(Activator.CreateInstance<T>()) : default(T); |
} |