Esempio n. 1
0
 public APropertyInfo(PropertyInfo pi, TypeInfoWrapper tiw, TypeConfiguration tc)
 {
     PropertyInfo      = pi;
     TypeInfoWrapper   = tiw;
     TypeConfiguration = tc;
     GetValueFunc      = PropertyHelper.MakeFastPropertyGetter(pi);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
 public VarsCollection(TypeInfoWrapper parent) => _parent = parent;
Esempio n. 5
0
        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
        }
Esempio n. 6
0
 // returns the index of the new entry
 public int Add(TypeInfoWrapper ti)
 {
     _containedTypeInfos.Add(ti);
     return(_containedTypeInfos.Count - 1);
 }