Exemple #1
0
        /// <summary>
        /// Updates the <see cref="AcquisitionInfo" /> associated with the next exposure.
        /// </summary>
        /// <param name="sessionId">The Id of the session</param>
        /// <param name="acquisitionInfo">The <see cref="AcquisitionInfo" /> to update.</param>
        /// <returns>The updated <see cref="AcquisitionInfo" /> object</returns>
        public async Task <AcquisitionInfo> UpdateAcquisitionInfo(string sessionId, AcquisitionInfo acquisitionInfo)
        {
            var response = await Client.PutAsJsonAsync <AcquisitionInfo>($"acquisition/{sessionId}/info", acquisitionInfo);

            response.EnsureSuccessStatusCode();
            return(await response.Content.ReadAsAsync <AcquisitionInfo>());
        }
Exemple #2
0
 public bool DeepEquals(DestinyCollectibleDefinition?other)
 {
     return(other is not null &&
            (DisplayProperties is not null ? DisplayProperties.DeepEquals(other.DisplayProperties) : other.DisplayProperties is null) &&
            Scope == other.Scope &&
            SourceString == other.SourceString &&
            SourceHash == other.SourceHash &&
            ItemHash == other.ItemHash &&
            (AcquisitionInfo is not null ? AcquisitionInfo.DeepEquals(other.AcquisitionInfo) : other.AcquisitionInfo is null) &&
            (StateInfo is not null ? StateInfo.DeepEquals(other.StateInfo) : other.StateInfo is null) &&
            (PresentationInfo is not null ? PresentationInfo.DeepEquals(other.PresentationInfo) : other.PresentationInfo is null) &&
            PresentationNodeType == other.PresentationNodeType &&
            TraitIds.DeepEqualsListNaive(other.TraitIds) &&
            TraitHashes.DeepEqualsListNaive(other.TraitHashes) &&
            ParentNodeHashes.DeepEqualsListNaive(other.ParentNodeHashes) &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
 public bool DeepEquals(DestinyCollectibleDefinition other)
 {
     return(other != null &&
            AcquisitionInfo.DeepEquals(other.AcquisitionInfo) &&
            (PresentationInfo != null ? PresentationInfo.DeepEquals(other.PresentationInfo) : other.PresentationInfo == null) &&
            DisplayProperties.DeepEquals(other.DisplayProperties) &&
            Item.DeepEquals(other.Item) &&
            ParentNodes.DeepEqualsReadOnlyCollections(other.ParentNodes) &&
            PresentationNodeType == other.PresentationNodeType &&
            Scope == other.Scope &&
            SourceHash == other.SourceHash &&
            SourceString == other.SourceString &&
            StateInfo.DeepEquals(other.StateInfo) &&
            Traits.DeepEqualsReadOnlyCollections(other.Traits) &&
            TraitIds.DeepEqualsReadOnlySimpleCollection(other.TraitIds) &&
            Blacklisted == other.Blacklisted &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
Exemple #4
0
 public void Update(DestinyCollectibleDefinition?other)
 {
     if (other is null)
     {
         return;
     }
     if (!DisplayProperties.DeepEquals(other.DisplayProperties))
     {
         DisplayProperties.Update(other.DisplayProperties);
         OnPropertyChanged(nameof(DisplayProperties));
     }
     if (Scope != other.Scope)
     {
         Scope = other.Scope;
         OnPropertyChanged(nameof(Scope));
     }
     if (SourceString != other.SourceString)
     {
         SourceString = other.SourceString;
         OnPropertyChanged(nameof(SourceString));
     }
     if (SourceHash != other.SourceHash)
     {
         SourceHash = other.SourceHash;
         OnPropertyChanged(nameof(SourceHash));
     }
     if (ItemHash != other.ItemHash)
     {
         ItemHash = other.ItemHash;
         OnPropertyChanged(nameof(ItemHash));
     }
     if (!AcquisitionInfo.DeepEquals(other.AcquisitionInfo))
     {
         AcquisitionInfo.Update(other.AcquisitionInfo);
         OnPropertyChanged(nameof(AcquisitionInfo));
     }
     if (!StateInfo.DeepEquals(other.StateInfo))
     {
         StateInfo.Update(other.StateInfo);
         OnPropertyChanged(nameof(StateInfo));
     }
     if (!PresentationInfo.DeepEquals(other.PresentationInfo))
     {
         PresentationInfo.Update(other.PresentationInfo);
         OnPropertyChanged(nameof(PresentationInfo));
     }
     if (PresentationNodeType != other.PresentationNodeType)
     {
         PresentationNodeType = other.PresentationNodeType;
         OnPropertyChanged(nameof(PresentationNodeType));
     }
     if (!TraitIds.DeepEqualsListNaive(other.TraitIds))
     {
         TraitIds = other.TraitIds;
         OnPropertyChanged(nameof(TraitIds));
     }
     if (!TraitHashes.DeepEqualsListNaive(other.TraitHashes))
     {
         TraitHashes = other.TraitHashes;
         OnPropertyChanged(nameof(TraitHashes));
     }
     if (!ParentNodeHashes.DeepEqualsListNaive(other.ParentNodeHashes))
     {
         ParentNodeHashes = other.ParentNodeHashes;
         OnPropertyChanged(nameof(ParentNodeHashes));
     }
     if (Hash != other.Hash)
     {
         Hash = other.Hash;
         OnPropertyChanged(nameof(Hash));
     }
     if (Index != other.Index)
     {
         Index = other.Index;
         OnPropertyChanged(nameof(Index));
     }
     if (Redacted != other.Redacted)
     {
         Redacted = other.Redacted;
         OnPropertyChanged(nameof(Redacted));
     }
 }
        public bool Equals(DestinyCollectibleDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayProperties == input.DisplayProperties ||
                     (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties))
                     ) &&
                 (
                     Scope == input.Scope ||
                     (Scope != null && Scope.Equals(input.Scope))
                 ) &&
                 (
                     SourceString == input.SourceString ||
                     (SourceString != null && SourceString.Equals(input.SourceString))
                 ) &&
                 (
                     SourceHash == input.SourceHash ||
                     (SourceHash.Equals(input.SourceHash))
                 ) &&
                 (
                     ItemHash == input.ItemHash ||
                     (ItemHash.Equals(input.ItemHash))
                 ) &&
                 (
                     AcquisitionInfo == input.AcquisitionInfo ||
                     (AcquisitionInfo != null && AcquisitionInfo.Equals(input.AcquisitionInfo))
                 ) &&
                 (
                     StateInfo == input.StateInfo ||
                     (StateInfo != null && StateInfo.Equals(input.StateInfo))
                 ) &&
                 (
                     PresentationInfo == input.PresentationInfo ||
                     (PresentationInfo != null && PresentationInfo.Equals(input.PresentationInfo))
                 ) &&
                 (
                     PresentationNodeType == input.PresentationNodeType ||
                     (PresentationNodeType != null && PresentationNodeType.Equals(input.PresentationNodeType))
                 ) &&
                 (
                     TraitIds == input.TraitIds ||
                     (TraitIds != null && TraitIds.SequenceEqual(input.TraitIds))
                 ) &&
                 (
                     TraitHashes == input.TraitHashes ||
                     (TraitHashes != null && TraitHashes.SequenceEqual(input.TraitHashes))
                 ) &&
                 (
                     ParentNodeHashes == input.ParentNodeHashes ||
                     (ParentNodeHashes != null && ParentNodeHashes.SequenceEqual(input.ParentNodeHashes))
                 ) &&
                 (
                     Hash == input.Hash ||
                     (Hash.Equals(input.Hash))
                 ) &&
                 (
                     Index == input.Index ||
                     (Index.Equals(input.Index))
                 ) &&
                 (
                     Redacted == input.Redacted ||
                     (Redacted != null && Redacted.Equals(input.Redacted))
                 ));
        }