public static GetObject ( DBus.Connection conn, string bus_name, ObjectPath object_path, |
||
conn | DBus.Connection | |
bus_name | string | |
object_path | ObjectPath | |
declType | ||
return | object |
public object GetObject(Type type, string bus_name, ObjectPath path) { if (!CheckBusNameExists(bus_name)) { return(null); } //if the requested type is an interface, we can implement it efficiently //otherwise we fall back to using a transparent proxy if (type.IsInterface || type.IsAbstract) { return(BusObject.GetObject(this, bus_name, path, type)); } else { if (ProtocolInformation.Verbose) { Console.Error.WriteLine("Warning: Note that MarshalByRefObject use is not recommended; for best performance, define interfaces"); } BusObject busObject = new BusObject(this, bus_name, path); DProxy prox = new DProxy(busObject, type); return(prox.GetTransparentProxy()); } }
public object GetObject(Type type, string bus_name, ObjectPath path) { if (!CheckBusNameExists(bus_name)) { return(null); } //if the requested type is an interface, we can implement it efficiently //otherwise we fall back to using a transparent proxy if (type.IsInterface || type.IsAbstract) { return(BusObject.GetObject(this, bus_name, path, type)); } else { throw new ApplicationException("Warning: Note that MarshalByRefObject use is not available"); } }