3 namespace Tizen.NUI.Xaml.Build.Tasks
5 static class FieldReferenceExtensions
7 public static FieldReference ResolveGenericParameters(this FieldReference self, TypeReference declaringTypeRef)
9 var fieldType = self.FieldType;
10 if (fieldType.IsGenericParameter)
12 var genericParameter = (GenericParameter)fieldType;
13 fieldType = ((GenericInstanceType)declaringTypeRef).GenericArguments[genericParameter.Position];
15 var fieldReference = new FieldReference(self.Name, fieldType)
17 DeclaringType = declaringTypeRef
19 return fieldReference;