// Extracts properties from a WinRT PropertyChangedEventArgs and creates a new // managed PropertyChangedEventArgs instance. // This method is called from IL stubs and needs to have its token stabilized. internal static PropertyChangedEventArgs ConvertToManaged(IntPtr nativeArgsIP) { if (nativeArgsIP == IntPtr.Zero) return null; object obj = WindowsRuntimeMarshal.GetUniqueObjectForIUnknownWithoutUnboxing(nativeArgsIP); IPropertyChangedEventArgs nativeArgs = (IPropertyChangedEventArgs)obj; return new PropertyChangedEventArgs(nativeArgs.PropertyName); }
static internal PropertyChangedEventArgs ConvertToManaged(IntPtr nativeArgsIP) { if (nativeArgsIP == IntPtr.Zero) { return(null); } object obj = System.StubHelpers.InterfaceMarshaler.ConvertToManagedWithoutUnboxing(nativeArgsIP); IPropertyChangedEventArgs nativeArgs = (IPropertyChangedEventArgs)obj; return(new PropertyChangedEventArgs(nativeArgs.PropertyName)); }
// Extracts properties from a WinRT PropertyChangedEventArgs and creates a new // managed PropertyChangedEventArgs instance. // This method is called from IL stubs and needs to have its token stabilized. internal static PropertyChangedEventArgs ConvertToManaged(IntPtr nativeArgsIP) { if (nativeArgsIP == IntPtr.Zero) { return(null); } object obj = Marshal.GetUniqueObjectForIUnknown(nativeArgsIP); IPropertyChangedEventArgs nativeArgs = (IPropertyChangedEventArgs)obj; return(new PropertyChangedEventArgs(nativeArgs.PropertyName)); }