private ProxyProvidedPropertyInfo(RdProvidedPropertyInfo propertyInfo, int typeProviderId, TypeProvidersContext typeProvidersContext, ProvidedTypeContextHolder context) : base(null, context.Context) { myPropertyInfo = propertyInfo; myTypeProviderId = typeProviderId; myTypeProvidersContext = typeProvidersContext; myContext = context; myMethods = new InterruptibleLazy <ProvidedMethodInfo[]>(() => // ReSharper disable once CoVariantArrayConversion GetMethodsInfos() .Select(t => ProxyProvidedMethodInfo.Create(t, typeProviderId, typeProvidersContext, context)) .ToArray()); myIndexParameters = new InterruptibleLazy <ProvidedParameterInfo[]>( () => // ReSharper disable once CoVariantArrayConversion propertyInfo.IndexParameters .Select(t => ProxyProvidedParameterInfo.Create(t, typeProviderId, typeProvidersContext, context)) .ToArray()); myCustomAttributes = new InterruptibleLazy <RdCustomAttributeData[]>(() => myTypeProvidersContext.ProvidedCustomAttributeProvider.GetCustomAttributes(this)); }
public static ProxyProvidedPropertyInfo Create(RdProvidedPropertyInfo propertyInfo, int typeProviderId, TypeProvidersContext typeProvidersContext, ProvidedTypeContextHolder context) => propertyInfo == null ? null : new ProxyProvidedPropertyInfo(propertyInfo, typeProviderId, typeProvidersContext, context);