/// <summary> /// Returns a list of organizations the requesting user has access to /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <ListOKResponseItem> > ListAsync(this IOrganizations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of organizations the requesting user has access to /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='org'> /// The data for the org /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OrganizationResponse> UpdateAsync(this IOrganizations operations, string orgName, OrganizationPatchRequest org, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(orgName, org, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public PartiesWrapper(IOptions <LocalPlatformSettings> localPlatformSettings, IPersons personsService, IOrganizations organizationService) { _localPlatformSettings = localPlatformSettings.Value; this._organizationService = organizationService; this._personService = personsService; }
public CharityViewModel(INavigationService navigationService, IEventAggregator ea, IAuthentication authentication, IUserInformation userInformation, IFeature donationservice, IOrganizations organizations, IAppInfo appInfo, IFeature statementsservice) : base(navigationService) { _organizations = organizations ?? throw new System.ArgumentNullException(nameof(organizations)); _authentication = authentication ?? throw new System.ArgumentNullException(nameof(authentication)); _donationservice = donationservice ?? throw new System.ArgumentNullException(nameof(donationservice)); _userInformation = userInformation ?? throw new System.ArgumentNullException(nameof(userInformation)); _appInfo = appInfo ?? throw new System.ArgumentNullException(nameof(appInfo)); _statementsservice = statementsservice ?? throw new System.ArgumentNullException(nameof(statementsservice)); _ea = ea; Initialize(); }
private HttpClient GetTestClient(IOrganizations organizationsService) { Program.ConfigureSetupLogging(); string projectDir = Directory.GetCurrentDirectory(); string configPath = Path.Combine(projectDir, "appsettings.json"); HttpClient client = _factory.WithWebHostBuilder(builder => { builder.ConfigureTestServices(services => { services.AddSingleton(organizationsService); // Set up mock authentication so that not well known endpoint is used services.AddSingleton <IPostConfigureOptions <JwtCookieOptions>, JwtCookiePostConfigureOptionsStub>(); services.AddSingleton <ISigningKeysResolver, SigningKeyResolverMock>(); }); builder.ConfigureAppConfiguration((context, conf) => { conf.AddJsonFile(configPath); }); }).CreateClient(); return(client); }
public GiftCardViewModel(INavigationService navigationService, IEventAggregator ea, IAuthentication authentication, IFeature creategiftcardservice, IUserInformation userInformation, IOrganizations organizations, IQRCode qRCode, IAppInfo appInfo, IApplications applicationsService, IFeature giftcardservice) : base(navigationService) { _ea = ea; _authentication = authentication ?? throw new System.ArgumentNullException(nameof(authentication)); _creategiftcardservice = creategiftcardservice ?? throw new System.ArgumentNullException(nameof(userInformation)); _userInformation = userInformation ?? throw new System.ArgumentNullException(nameof(userInformation)); _organizations = organizations ?? throw new System.ArgumentNullException(nameof(organizations)); _qRCode = qRCode ?? throw new System.ArgumentNullException(nameof(qRCode)); _appInfo = appInfo ?? throw new System.ArgumentNullException(nameof(appInfo)); _applicationsService = applicationsService ?? throw new System.ArgumentNullException(nameof(applicationsService)); _giftcardservice = giftcardservice ?? throw new System.ArgumentNullException(nameof(giftcardservice)); InitializeInput(); LoadGiftCard(); }
/// <summary> /// Returns a list of organizations the requesting user has access to /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='org'> /// The data for the org /// </param> public static OrganizationResponse Update(this IOrganizations operations, string orgName, OrganizationPatchRequest org) { return(operations.UpdateAsync(orgName, org).GetAwaiter().GetResult()); }
/// <summary> /// Returns the details of a single organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> public static OrganizationResponse Get(this IOrganizations operations, string orgName) { return(operations.GetAsync(orgName).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of organizations the requesting user has access to /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <ListOKResponseItem> List(this IOrganizations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Creates a new organization and returns it to the caller /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='organization'> /// The organization data /// </param> public static OrganizationResponse CreateOrUpdate(this IOrganizations operations, OrganizationRequest organization) { return(operations.CreateOrUpdateAsync(organization).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a single organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IOrganizations operations, string orgName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(orgName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a single organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> public static void Delete(this IOrganizations operations, string orgName) { operations.DeleteAsync(orgName).GetAwaiter().GetResult(); }
/// <summary> /// Initializes a new instance of the <see cref="OrganizationsController"/> class /// </summary> /// <param name="organizationsWrapper">The organizations wrapper</param> public OrganizationsController(IOrganizations organizationsWrapper) { _organizationsWrapper = organizationsWrapper; }