Пример #1
0
        /// <inheritdoc />
        public async Task <INanoLeaf> CreateNanoLeafAsync()
        {
            var authorizationToken = await CreateAuthorizationTokenAsync();

            var apiContext = new NanoLeafApiContext(authorizationToken, _httpClient);

            return(new NanoLeaf(apiContext));
        }
Пример #2
0
        internal NanoLeaf(NanoLeafApiContext apiContext)
        {
            _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));

            State       = new NanoLeafState(_apiContext);
            Effects     = new NanoLeafEffects(_apiContext);
            PanelLayout = new NanoLeafPanelLayout(_apiContext);
            Rhythm      = new NanoLeafRhythm(_apiContext);
        }
Пример #3
0
 public NanoLeafState(NanoLeafApiContext apiContext)
 {
     _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));
 }
Пример #4
0
 public NanoLeafPanelLayout(NanoLeafApiContext apiContext)
 {
     _apiContext = apiContext ?? throw new ArgumentNullException(nameof(apiContext));
 }
Пример #5
0
        /// <inheritdoc />
        public INanoLeaf CreateNanoLeaf(string authorizationToken)
        {
            var apiContext = new NanoLeafApiContext(authorizationToken, _httpClient);

            return(new NanoLeaf(apiContext));
        }