dotnet-core/release-notes/1.0/1.0.0-api/1.0.0-api_System.Runtime.InteropServices.WindowsRuntime.md
2017-07-05 14:24:38 -07:00

2.8 KiB

System.Runtime.InteropServices.WindowsRuntime

+namespace System.Runtime.InteropServices.WindowsRuntime {
+    public sealed class DefaultInterfaceAttribute : Attribute {
+        public DefaultInterfaceAttribute(Type defaultInterface);
+        public Type DefaultInterface { get; }
+    }
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public struct EventRegistrationToken {
+        public override bool Equals(object obj);
+        public override int GetHashCode();
+        public static bool operator ==(EventRegistrationToken left, EventRegistrationToken right);
+        public static bool operator !=(EventRegistrationToken left, EventRegistrationToken right);
+    }
+    public sealed class EventRegistrationTokenTable<T> where T : class {
+        public EventRegistrationTokenTable();
+        public T InvocationList { get; set; }
+        public EventRegistrationToken AddEventHandler(T handler);
+        public static EventRegistrationTokenTable<T> GetOrCreateEventRegistrationTokenTable(ref EventRegistrationTokenTable<T> refEventTable);
+        public void RemoveEventHandler(EventRegistrationToken token);
+        public void RemoveEventHandler(T handler);
+    }
+    public interface IActivationFactory {
+        object ActivateInstance();
+    }
+    public sealed class InterfaceImplementedInVersionAttribute : Attribute {
+        public InterfaceImplementedInVersionAttribute(Type interfaceType, byte majorVersion, byte minorVersion, byte buildVersion, byte revisionVersion);
+        public byte BuildVersion { get; }
+        public Type InterfaceType { get; }
+        public byte MajorVersion { get; }
+        public byte MinorVersion { get; }
+        public byte RevisionVersion { get; }
+    }
+    public sealed class ReadOnlyArrayAttribute : Attribute {
+        public ReadOnlyArrayAttribute();
+    }
+    public sealed class ReturnValueNameAttribute : Attribute {
+        public ReturnValueNameAttribute(string name);
+        public string Name { get; }
+    }
+    public static class WindowsRuntimeMarshal {
+        public static void AddEventHandler<T>(Func<T, EventRegistrationToken> addMethod, Action<EventRegistrationToken> removeMethod, T handler);
+        public static void FreeHString(IntPtr ptr);
+        public static IActivationFactory GetActivationFactory(Type type);
+        public static string PtrToStringHString(IntPtr ptr);
+        public static void RemoveAllEventHandlers(Action<EventRegistrationToken> removeMethod);
+        public static void RemoveEventHandler<T>(Action<EventRegistrationToken> removeMethod, T handler);
+        public static IntPtr StringToHString(string s);
+    }
+    public sealed class WriteOnlyArrayAttribute : Attribute {
+        public WriteOnlyArrayAttribute();
+    }
+}