index.html
Main Page
|
modules.html
Modules
|
namespaces.html
Namespace List
|
hierarchy.html
Class Hierarchy
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
namespacemembers.html
Namespace Members
|
functions.html
Data Fields
|
pages.html
Related Pages
dir_000000.html
mono
Introspector.cs
00001
namespace
DBus
00002 {
00003
00004
using
System;
00005
using
System.Runtime.InteropServices;
00006
using
System.Diagnostics;
00007
using
System.Collections;
00008
using
System.Reflection;
00009
classDBus_1_1Introspector.html
00010
internal
class
classDBus_1_1Introspector.html
Introspector
00011   {
00012
private
Type type;
00013
private
static
Hashtable introspectors =
new
Hashtable();
00014
private
Hashtable interfaceProxies = null;
00015
classDBus_1_1Introspector.html#e0
00016
public
static
classDBus_1_1Introspector.html
Introspector
classDBus_1_1Introspector.html#e0
GetIntrospector
(Type type)
00017     {
00018
if
(!introspectors.Contains(type)) {
00019         introspectors[type] =
new
classDBus_1_1Introspector.html
Introspector
(type);
00020       }
00021
00022
return
(
classDBus_1_1Introspector.html
Introspector
) introspectors[type];
00023     }
00024
00025
private
classDBus_1_1Introspector.html
Introspector
(Type type)
00026     {
00027       interfaceProxies =
new
Hashtable();
00028       AddType(type);
00029
this
.type = type;
00030     }
00031
00032
private
void
AddType(Type type)
00033     {
00034
if
(type == typeof(object)) {
00035
// Base case
00036
return
;
00037       }
00038
00039       object[] attributes = type.GetCustomAttributes(typeof(InterfaceAttribute),
false
);
00040
if
(attributes.Length >= 1) {
00041
// This is a D-BUS interface so add it to the hashtable
00042         InterfaceProxy interfaceProxy = InterfaceProxy.GetInterface(type);
00043         interfaceProxies.Add(interfaceProxy.InterfaceName, interfaceProxy);
00044       }
00045
00046       AddType(type.BaseType);
00047     }
00048
classDBus_1_1Introspector.html#a0
00049
public
classDBus_1_1InterfaceProxy.html
InterfaceProxy
classDBus_1_1Introspector.html#a0
GetInterface
(string interfaceName) {
00050
if
(interfaceProxies.Contains(interfaceName)) {
00051
return
(
classDBus_1_1InterfaceProxy.html
InterfaceProxy
) interfaceProxies[interfaceName];
00052       }
else
{
00053
return
null;
00054       }
00055     }
00056
00057
public
Hashtable
classDBus_1_1Introspector.html#00
InterfaceProxies
classDBus_1_1Introspector.html#00
00058
{
00059       get {
00060
return
this
.interfaceProxies;
00061       }
00062     }
00063
00064
public
ConstructorInfo
classDBus_1_1Introspector.html#01
Constructor
classDBus_1_1Introspector.html#01
00065
{
00066       get {
00067         ConstructorInfo ret =
this
.type.GetConstructor(
new
Type[0]);
00068
if
(ret != null) {
00069
return
ret;
00070         }
else
{
00071
return
typeof(object).GetConstructor(
new
Type[0]);
00072         }
00073       }
00074     }
00075
classDBus_1_1Introspector.html#a1
00076
public
override string
classDBus_1_1Introspector.html#a1
ToString
()
00077     {
00078
return
this
.type.ToString();
00079     }
00080   }
00081 }
Generated on Tue Sep 13 01:28:08 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
