Пример #1
0
        private static unsafe int Do_Abi_get_Type_3(IntPtr thisPtr, out global::ABI.System.Type value)
        {
            global::System.Type __value = default;

            value = default;

            try
            {
                __value = global::WinRT.ComWrappersSupport.FindObject <object>(thisPtr).GetType();
                value   = global::ABI.System.Type.FromManaged(__value);
            }
            catch (Exception __exception__)
            {
                global::WinRT.ExceptionHelpers.SetErrorInfo(__exception__);
                return(global::WinRT.ExceptionHelpers.GetHRForException(__exception__));
            }
            return(0);
        }
Пример #2
0
            private static unsafe int Do_Abi_get_Type_0(IntPtr thisPtr, out global::ABI.System.Type value)
            {
                global::System.Type __value = default;

                value = default;

                try
                {
                    __value = global::WinRT.ComWrappersSupport.FindObject <global::Microsoft.UI.Xaml.Data.ICustomProperty>(thisPtr).Type;
                    value   = global::ABI.System.Type.FromManaged(__value);
                }
                catch (Exception __exception__)
                {
                    global::WinRT.ExceptionHelpers.SetErrorInfo(__exception__);
                    return(global::WinRT.ExceptionHelpers.GetHRForException(__exception__));
                }
                return(0);
            }
Пример #3
0
        private static unsafe int Do_Abi_GetIndexedProperty_1(IntPtr thisPtr, IntPtr name, global::ABI.System.Type type, IntPtr *result)
        {
            global::Microsoft.UI.Xaml.Data.ICustomProperty __result = default;
            try
            {
                string       _name        = MarshalString.FromAbi(name);
                object       target       = global::WinRT.ComWrappersSupport.FindObject <object>(thisPtr);
                PropertyInfo propertyInfo = target.GetType().GetProperty(
                    _name,
                    BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public,
                    null,                                                                   // default binder
                    null,                                                                   // ignore return type
                    new Type[] { global::ABI.System.Type.FromAbi(type) },                   // indexed parameter type
                    null                                                                    // ignore type modifier
                    );

                if (propertyInfo is object)
                {
                    __result = new ManagedCustomProperty(propertyInfo);
                }

                *result = MarshalInterface <global::Microsoft.UI.Xaml.Data.ICustomProperty> .FromManaged(__result);
            }
            catch (Exception __exception__)
            {
                global::WinRT.ExceptionHelpers.SetErrorInfo(__exception__);
                return(global::WinRT.ExceptionHelpers.GetHRForException(__exception__));
            }
            return(0);
        }