예제 #1
0
        public static IServiceCollection AddSingleUseTokens(this IServiceCollection services,
                                                            TableSingleUseTokenOptions options)
        {
            Guard.Null(nameof(services), services);
            Guard.Null(nameof(options), options);

            services.TryAddSingleton(options);
            services.TryAddSingleton <SystemClock>();
            services.TryAddTransient <ISingleUseTokenService, TableSingleUseTokenService>();

            return(services);
        }
 public TableStorageIdentityOptions(TableStoreOptions tableStore,
                                    TableSingleUseTokenOptions singleUseToken)
 {
     this._tableStore     = Guard.Null(nameof(tableStore), tableStore);
     this._singleUseToken = Guard.Null(nameof(singleUseToken), singleUseToken);
 }