コード例 #1
0
            public ProxyContainer(StaticProxyManager parent, Type type, ObjectPath path, string interfaceName, string service)
            {
                Parent         = parent;
                Type           = type;
                TypeDescriptor = TypeDescription.GetOrCreateCached(type, MemberExposure.AllInterfaces);
                ObjectPath     = path;
                InterfaceName  = interfaceName;
                Service        = service;

                FodyInterceptor = new Interceptor(this);

                interceptorHandler = new ProxyInterceptor(this, TypeDescriptor)
                {
                    DisposeHook = Dispose
                };
            }
コード例 #2
0
            public DBusObjectBase(ClientProxyManager parent, Type type, ObjectPath path, string interfaceName, string service)
            {
                Parent            = parent;
                Type              = type;
                TypeDescriptor    = TypeDescription.GetOrCreateCached(type, MemberExposure.AllInterfaces);
                ObjectPath        = path;
                InterfaceName     = interfaceName;
                Service           = service;
                castleInterceptor = new Interceptor(this);
                var componentIType = typeof(IDBusObjectProxy <>).MakeGenericType(type);

                //ProxyInstance = (IDBusObjectProxy)generator.CreateInterfaceProxyWithTarget(componentIType, new[] { type }, this, interceptor);
                ProxyInstance = generator.CreateInterfaceProxyWithTargetInterface(componentIType, new[] { type }, this, castleInterceptor);

                interceptorHandler = new ProxyInterceptor(this, TypeDescriptor)
                {
                    DisposeHook = Dispose
                };
            }