Exemple #1
0
        private void AppendAggregatedDataAdvertSpecific()
        {
            _advertChannelClickProportionsNew      = LogFlattener.FlattenAdvertChannelOperationProportions(_advertChannelClickProportionsSet);
            _advertChannelImpressionProportionsNew = LogFlattener.FlattenAdvertChannelOperationProportions(_advertChannelImpressionProportionsSet);
            _advertChannelImpressionProportionsAll = _advertChannelImpressionProportionsExisting + _advertChannelImpressionProportionsNew;
            _advertChannelClickProportionsAll      = _advertChannelClickProportionsExisting + _advertChannelClickProportionsNew;

            try
            {
                Locker.WriteEncryptString(ref _advertChannelImpressionProportionsStream, _advertChannelImpressionProportionsAll, _password);
            }
            catch (Exception ex)
            {
                _logger.WriteError(ex);
            }

            try
            {
                Locker.WriteEncryptString(ref _advertChannelClickProportionsStream, _advertChannelClickProportionsAll, _password);
            }
            catch (Exception ex)
            {
                _logger.WriteError(ex);
            }

            _advertChannelImpressionProportionsAll      = "";
            _advertChannelImpressionProportionsExisting = "";
            _advertChannelImpressionProportionsNew      = "";
            _advertChannelClickProportionsAll           = "";
            _advertChannelClickProportionsExisting      = "";
            _advertChannelClickProportionsNew           = "";
        }
Exemple #2
0
        // Flatten aggregated structures that are in memory and appends them to existing ones on files
        private void AppendAggregatedDataNonAdvertSpecific()
        {
            _dateClicksPerAssetNew      = LogFlattener.FlattenOperationsPerDatePerAsset(_dateClicksPerAssetSet);
            _dateImpressionsPerAssetNew = LogFlattener.FlattenOperationsPerDatePerAsset(_dateImpressionsPerAssetSet);

            _dateClicksPerAssetAll      = _dateClicksPerAssetExisting + _dateClicksPerAssetNew;
            _dateImpressionsPerAssetAll = _dateImpressionsPerAssetExisting + _dateImpressionsPerAssetNew;

            try
            {
                Locker.WriteEncryptString(ref _dateClicksPerAssetStream, _dateClicksPerAssetAll, _password);
            }
            catch (Exception ex)
            {
                _logger.WriteError(ex);
            }

            try
            {
                Locker.WriteEncryptString(ref _dateImpressionsPerAssetStream, _dateImpressionsPerAssetAll, _password);
            }
            catch (Exception ex)
            {
                _logger.WriteError(ex);
            }

            _dateClicksPerAssetAll           = "";
            _dateClicksPerAssetExisting      = "";
            _dateClicksPerAssetNew           = "";
            _dateImpressionsPerAssetAll      = "";
            _dateImpressionsPerAssetExisting = "";
            _dateImpressionsPerAssetNew      = "";
        }