예제 #1
0
        private async Task <GattApplication> BuildGattApplication(string applicationObjectPath)
        {
            var application = new GattApplication(applicationObjectPath);
            await _ServerContext.Connection.RegisterObjectAsync(application);

            return(application);
        }
예제 #2
0
        private async Task <GattService> AddNewService(GattApplication application,
                                                       GattServiceDescription serviceDescription)
        {
            var gattService1Properties = GattPropertiesFactory.CreateGattService(serviceDescription);
            var gattService            = application.AddService(gattService1Properties);
            await _ServerContext.Connection.RegisterObjectAsync(gattService);

            return(gattService);
        }