public APropertyInfo(PropertyInfo pi, TypeInfoWrapper tiw, TypeConfiguration tc) { PropertyInfo = pi; TypeInfoWrapper = tiw; TypeConfiguration = tc; GetValueFunc = PropertyHelper.MakeFastPropertyGetter(pi); }
public override int GetTypeInfoType(int index, IntPtr pTKind) { if (index >= _containedTypeInfos.Count) { return((int)KnownComHResults.TYPE_E_ELEMENTNOTFOUND); } var ti = _containedTypeInfos[index]; var typeKind = TypeInfoWrapper.PatchTypeKind(ti.TypeKind); RdMarshal.WriteInt32(pTKind, (int)typeKind); return((int)KnownComHResults.S_OK); }
private object AugmentOne( object obj, Action <AugmentationContext, object> configure, object configureState, TypeInfoWrapper tiw, AugmentationContext context) { if (tiw.IsWrapper) { context.Object = ((AugmenterWrapper)obj).Object; context.EphemeralTypeConfiguration = ((AugmenterWrapper)obj).TypeConfiguration; } configure?.Invoke(context, configureState); return(AugmentCore(context)); }
public VarsCollection(TypeInfoWrapper parent) => _parent = parent;
public static async Task <string> GetTypeUrlAsync(TypeInfoWrapper type) { var search = await SearchAsync(type.Name, $"{type.Name}.cs"); return(search.FirstOrDefault(x => x.Name == $"{type.Name}.cs")?.HtmlUrl ?? search.FirstOrDefault()?.HtmlUrl ?? null); //null = Not found }
// returns the index of the new entry public int Add(TypeInfoWrapper ti) { _containedTypeInfos.Add(ti); return(_containedTypeInfos.Count - 1); }