Exemple #1
0
 /// <summary>
 /// Creates the specified AccessPackageCatalog using POST.
 /// </summary>
 /// <param name="accessPackageCatalogToCreate">The AccessPackageCatalog to create.</param>
 /// <returns>The created AccessPackageCatalog.</returns>
 public System.Threading.Tasks.Task <AccessPackageCatalog> CreateAsync(AccessPackageCatalog accessPackageCatalogToCreate)
 {
     return(this.CreateAsync(accessPackageCatalogToCreate, CancellationToken.None));
 }
Exemple #2
0
 /// <summary>
 /// Adds the specified AccessPackageCatalog to the collection via POST.
 /// </summary>
 /// <param name="accessPackageCatalog">The AccessPackageCatalog to add.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
 /// <returns>The created AccessPackageCatalog.</returns>
 public System.Threading.Tasks.Task <AccessPackageCatalog> AddAsync(AccessPackageCatalog accessPackageCatalog, CancellationToken cancellationToken)
 {
     this.ContentType = "application/json";
     this.Method      = "POST";
     return(this.SendAsync <AccessPackageCatalog>(accessPackageCatalog, cancellationToken));
 }
Exemple #3
0
        /// <summary>
        /// Initializes any collection properties after deserialization, like next requests for paging.
        /// </summary>
        /// <param name="accessPackageCatalogToInitialize">The <see cref="AccessPackageCatalog"/> with the collection properties to initialize.</param>
        private void InitializeCollectionProperties(AccessPackageCatalog accessPackageCatalogToInitialize)
        {
            if (accessPackageCatalogToInitialize != null && accessPackageCatalogToInitialize.AdditionalData != null)
            {
                if (accessPackageCatalogToInitialize.AccessPackageResources != null && accessPackageCatalogToInitialize.AccessPackageResources.CurrentPage != null)
                {
                    accessPackageCatalogToInitialize.AccessPackageResources.AdditionalData = accessPackageCatalogToInitialize.AdditionalData;

                    object nextPageLink;
                    accessPackageCatalogToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        accessPackageCatalogToInitialize.AccessPackageResources.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }

                if (accessPackageCatalogToInitialize.AccessPackageResourceRoles != null && accessPackageCatalogToInitialize.AccessPackageResourceRoles.CurrentPage != null)
                {
                    accessPackageCatalogToInitialize.AccessPackageResourceRoles.AdditionalData = accessPackageCatalogToInitialize.AdditionalData;

                    object nextPageLink;
                    accessPackageCatalogToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        accessPackageCatalogToInitialize.AccessPackageResourceRoles.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }

                if (accessPackageCatalogToInitialize.AccessPackageResourceScopes != null && accessPackageCatalogToInitialize.AccessPackageResourceScopes.CurrentPage != null)
                {
                    accessPackageCatalogToInitialize.AccessPackageResourceScopes.AdditionalData = accessPackageCatalogToInitialize.AdditionalData;

                    object nextPageLink;
                    accessPackageCatalogToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        accessPackageCatalogToInitialize.AccessPackageResourceScopes.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }

                if (accessPackageCatalogToInitialize.AccessPackages != null && accessPackageCatalogToInitialize.AccessPackages.CurrentPage != null)
                {
                    accessPackageCatalogToInitialize.AccessPackages.AdditionalData = accessPackageCatalogToInitialize.AdditionalData;

                    object nextPageLink;
                    accessPackageCatalogToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        accessPackageCatalogToInitialize.AccessPackages.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }
            }
        }
Exemple #4
0
 /// <summary>
 /// Adds the specified AccessPackageCatalog to the collection via POST.
 /// </summary>
 /// <param name="accessPackageCatalog">The AccessPackageCatalog to add.</param>
 /// <returns>The created AccessPackageCatalog.</returns>
 public System.Threading.Tasks.Task <AccessPackageCatalog> AddAsync(AccessPackageCatalog accessPackageCatalog)
 {
     return(this.AddAsync(accessPackageCatalog, CancellationToken.None));
 }