Example #1
0
        public async Task AllocateFunctionAsync(MastodonAuthentication auth)
        {
            this.Auth      = auth;
            this.Counter   = this.GetFunctionCounter(auth);
            this._function = await this.Counter.IncrementAsync();

            this.OnFunctionAllocated();
            this._function.Updated += this.OnFunctionUpdated;
            this._function.Deleted += this.OnFunctionDeleted;
        }
Example #2
0
 /// <summary>
 /// 認証オブジェクトから、サーバと通信を行うためのConnectionFunctionを取り出す
 /// </summary>
 /// <param name="auth">認証オブジェクト</param>
 /// <returns></returns>
 protected abstract ConnectionFunctionCounterBase <T> GetFunctionCounter(MastodonAuthentication auth);
Example #3
0
 protected override ConnectionFunctionCounterBase <MastodonNotification> GetFunctionCounter(MastodonAuthentication auth)
 => auth.NotificationStreamingFunctionCounter;
Example #4
0
 protected override ConnectionFunctionCounterBase <MastodonStatus> GetFunctionCounter(MastodonAuthentication auth)
 => auth.HomeStreamingFunctionCounter;