예제 #1
0
        public override MetricDefaultsV1 Deserialize(YamlMappingNode node)
        {
            var defaults = new MetricDefaultsV1();

            defaults.Aggregation = node.DeserializeChild(AggregationTag, _aggregationDeserializer);
            defaults.Scraping    = node.DeserializeChild(ScrapingTag, _scrapingDeserializer);

            return(defaults);
        }
예제 #2
0
        protected override AzureResourceDefinitionV1 DeserializeResource(YamlMappingNode node)
        {
            var accountName = node.GetString(AccountNameTag);
            var queueName   = node.GetString(QueueNameTag);
            var sasToken    = node.DeserializeChild(SasTokenTag, _secretDeserializer);

            return(new StorageQueueResourceV1
            {
                AccountName = accountName,
                QueueName = queueName,
                SasToken = sasToken
            });
        }
        protected override StorageAccountResourceV1 DeserializeResource(YamlMappingNode node)
        {
            var storageAccountResource = base.DeserializeResource(node);

            var queueName = node.GetString(QueueNameTag);
            var sasToken  = node.DeserializeChild(SasTokenTag, _secretDeserializer);

            var storageQueueResource = new StorageQueueResourceV1(storageAccountResource)
            {
                QueueName = queueName,
                SasToken  = sasToken
            };

            return(storageQueueResource);
        }