From a929c9a3b465db8b7e17b9b39936c612c2621a7c Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 14 Jul 2006 16:20:12 +0000 Subject: * Remove all bindings --- mono/Introspector.cs | 81 ---------------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 mono/Introspector.cs (limited to 'mono/Introspector.cs') diff --git a/mono/Introspector.cs b/mono/Introspector.cs deleted file mode 100644 index 8e97abc6..00000000 --- a/mono/Introspector.cs +++ /dev/null @@ -1,81 +0,0 @@ -namespace DBus -{ - - using System; - using System.Runtime.InteropServices; - using System.Diagnostics; - using System.Collections; - using System.Reflection; - - internal class Introspector - { - private Type type; - private static Hashtable introspectors = new Hashtable(); - private Hashtable interfaceProxies = null; - - public static Introspector GetIntrospector(Type type) - { - if (!introspectors.Contains(type)) { - introspectors[type] = new Introspector(type); - } - - return (Introspector) introspectors[type]; - } - - private Introspector(Type type) - { - interfaceProxies = new Hashtable(); - AddType(type); - this.type = type; - } - - private void AddType(Type type) - { - if (type == typeof(object)) { - // Base case - return; - } - - object[] attributes = type.GetCustomAttributes(typeof(InterfaceAttribute), false); - if (attributes.Length >= 1) { - // This is a D-BUS interface so add it to the hashtable - InterfaceProxy interfaceProxy = InterfaceProxy.GetInterface(type); - interfaceProxies.Add(interfaceProxy.InterfaceName, interfaceProxy); - } - - AddType(type.BaseType); - } - - public InterfaceProxy GetInterface(string interfaceName) { - if (interfaceProxies.Contains(interfaceName)) { - return (InterfaceProxy) interfaceProxies[interfaceName]; - } else { - return null; - } - } - - public Hashtable InterfaceProxies - { - get { - return this.interfaceProxies; - } - } - - public ConstructorInfo Constructor - { - get { - ConstructorInfo ret = this.type.GetConstructor(new Type[0]); - if (ret != null) { - return ret; - } else { - return typeof(object).GetConstructor(new Type[0]); - } - } - } - - public override string ToString() - { - return this.type.ToString(); - } - } -} -- cgit