Microsoft.Xades.XadesSignedXml.CheckAllReferencesExistInAllDataObjectsTimeStamp C# (CSharp) Method

CheckAllReferencesExistInAllDataObjectsTimeStamp() public method

Check if there is a HashDataInfo for each reference if there is a AllDataObjectsTimeStamp
public CheckAllReferencesExistInAllDataObjectsTimeStamp ( ) : bool
return bool
        public virtual bool CheckAllReferencesExistInAllDataObjectsTimeStamp()
        {
            AllDataObjectsTimeStampCollection allDataObjectsTimeStampCollection;
            bool allHashDataInfosExist;
            TimeStamp timeStamp;
            int timeStampCounter;
            bool retVal;

            allHashDataInfosExist = true;
            retVal = false;
            allDataObjectsTimeStampCollection = this.XadesObject.QualifyingProperties.SignedProperties.SignedDataObjectProperties.AllDataObjectsTimeStampCollection;
            if (allDataObjectsTimeStampCollection.Count > 0)
            {
                for (timeStampCounter = 0; allHashDataInfosExist && (timeStampCounter < allDataObjectsTimeStampCollection.Count); timeStampCounter++)
                {
                    timeStamp = allDataObjectsTimeStampCollection[timeStampCounter];
                    allHashDataInfosExist &= this.CheckHashDataInfosForTimeStamp(timeStamp);
                }
                if (!allHashDataInfosExist)
                {
                    throw new CryptographicException("At least one HashDataInfo is missing in AllDataObjectsTimeStamp element");
                }
            }
            retVal = true;

            return retVal;
        }