AllJoynUnity.AllJoyn.BusObject.BusObject C# (CSharp) Метод

BusObject() публичный Метод

public BusObject ( BusAttachment bus, string path, bool isPlaceholder ) : System
bus BusAttachment
path string
isPlaceholder bool
Результат System
            public BusObject(BusAttachment bus, string path, bool isPlaceholder)
            {
                // Can't let the GC free these delegates so they must be members
                _propertyGet = new InternalPropertyGetEventHandler(this._PropertyGet);
                _propertySet = new InternalPropertySetEventHandler(this._PropertySet);
                _objectRegistered = new InternalObjectRegisteredEventHandler(this._ObjectRegistered);
                _objectUnregistered = new InternalObjectUnregisteredEventHandler(this._ObjectUnregistered);

                // Ref holder for method handler internal delegates
                _methodHandlerDelegateRefHolder = new List<InternalMethodHandler>();

                BusObjectCallbacks callbacks;
                callbacks.property_get = Marshal.GetFunctionPointerForDelegate(_propertyGet);
                callbacks.property_set = Marshal.GetFunctionPointerForDelegate(_propertySet);
                callbacks.object_registered = Marshal.GetFunctionPointerForDelegate(_objectRegistered);
                callbacks.object_unregistered = Marshal.GetFunctionPointerForDelegate(_objectUnregistered);

                GCHandle gch = GCHandle.Alloc(callbacks, GCHandleType.Pinned);
                _busObject = alljoyn_busobject_create(bus.UnmanagedPtr, path, isPlaceholder ? 1 : 0, gch.AddrOfPinnedObject(), IntPtr.Zero);
                gch.Free();
            }