Exemple #1
0
        Task <IApplication> ITenantActions.CreateApplicationAsync(IApplication application, Action <ApplicationCreationOptionsBuilder> creationOptionsAction, CancellationToken cancellationToken)
        {
            var builder = new ApplicationCreationOptionsBuilder();

            creationOptionsAction(builder);
            var options = builder.Build();

            return(this.GetInternalAsyncDataStore().CreateAsync(ApplicationsPropertyName, application, options, cancellationToken));
        }
            public async Task Create_with_response_options()
            {
                var optionsBuilder = new ApplicationCreationOptionsBuilder();

                optionsBuilder.ResponseOptions.Expand(x => x.GetCustomData());
                var options = optionsBuilder.Build();

                await this.VerifyThat(options, resultsInQueryString : "?expand=customData");
            }
        IApplication ITenantActionsSync.CreateApplication(IApplication application, Action <ApplicationCreationOptionsBuilder> creationOptionsAction)
        {
            var builder = new ApplicationCreationOptionsBuilder();

            creationOptionsAction(builder);
            var options = builder.Build();

            return(this.GetInternalSyncDataStore().Create(ApplicationsPropertyName, application, options));
        }
            public async Task Create_with_all_options()
            {
                var optionsBuilder = new ApplicationCreationOptionsBuilder();

                optionsBuilder.CreateDirectory = true;
                optionsBuilder.DirectoryName   = "Foobar Directory";
                optionsBuilder.ResponseOptions.Expand(x => x.GetAccounts(0, 10));
                var options = optionsBuilder.Build();

                await this.VerifyThat(options, resultsInQueryString : "?createDirectory=Foobar+Directory&expand=accounts(offset:0,limit:10)");
            }