Skip to content

Commit

Permalink
chore: binary search c# issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Nov 24, 2023
1 parent 4ecf9f0 commit 374abd3
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions examples/csharp/documentation/IteratorStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,26 @@ public IteratorStack(Construct scope, string name) : base(scope, name)

// DOCS_BLOCK_START:iterators-chain
// We need a local to be able to pass the list to the iterator
// TerraformLocal configuration = new TerraformLocal(this, "configuration", new Dictionary<string, object> {
// {
// "website ",
// new Dictionary<string, object> {
// { "name", "website-static-files" },
// { "tags", new Dictionary<string, string> {
// { "app", "website" }
// }}
// }
// },
// {
// "images",
// new Dictionary<string, object> {
// { "name", "images" },
// { "tags", new Dictionary<string, string> {
// { "app", "image-converter" }
// }}
// }
// }
// });
TerraformLocal configuration = new TerraformLocal(this, "configuration", new Dictionary<string, object> {
{
"website ",
new Dictionary<string, object> {
{ "name", "website-static-files" },
{ "tags", new Dictionary<string, string> {
{ "app", "website" }
}}
}
},
{
"images",
new Dictionary<string, object> {
{ "name", "images" },
{ "tags", new Dictionary<string, string> {
{ "app", "image-converter" }
}}
}
}
});
// MapTerraformIterator s3BucketConfigurationIterator = MapTerraformIterator.FromMap(configuration.AsAnyMap);
// S3Bucket s3Buckets = new S3Bucket(this, "complex-iterator-buckets", new S3BucketConfig
// {
Expand All @@ -163,32 +163,32 @@ public IteratorStack(Construct scope, string name) : base(scope, name)
// DOCS_BLOCK_END:iterators-chain

// DOCS_BLOCK_START:iterators-for-expression
TerraformLocal values = new TerraformLocal(this, "values", new Dictionary<string, object> {
{
"website",
new Dictionary<string, object> {
{ "name", "website-static-files" },
{ "tags", new Dictionary<string, string> {
{ "app", "website" }
}}
}
},
{
"images",
new Dictionary<string, object> {
{ "name", "images" },
{ "tags", new Dictionary<string, string> {
{ "app", "image-converter" }
}}
}
}
});
MapTerraformIterator mapIterator = MapTerraformIterator.FromMap(values.AsAnyMap);
new TerraformLocal(this, "list-of-keys", mapIterator.Keys());
new TerraformLocal(this, "list-of-values", mapIterator.Values());
new TerraformLocal(this, "list-of-names", mapIterator.PluckProperty("name"));
new TerraformLocal(this, "list-of-names-of-included", mapIterator.ForExpressionForList("val.name if val.included"));
new TerraformLocal(this, "map-with-names-as-key-and-tags-as-value-of-included", mapIterator.ForExpressionForMap("val.name", "val.tags if val.included"));
// TerraformLocal values = new TerraformLocal(this, "values", new Dictionary<string, object> {
// {
// "website",
// new Dictionary<string, object> {
// { "name", "website-static-files" },
// { "tags", new Dictionary<string, string> {
// { "app", "website" }
// }}
// }
// },
// {
// "images",
// new Dictionary<string, object> {
// { "name", "images" },
// { "tags", new Dictionary<string, string> {
// { "app", "image-converter" }
// }}
// }
// }
// });
// MapTerraformIterator mapIterator = MapTerraformIterator.FromMap(values.AsAnyMap);
// new TerraformLocal(this, "list-of-keys", mapIterator.Keys());
// new TerraformLocal(this, "list-of-values", mapIterator.Values());
// new TerraformLocal(this, "list-of-names", mapIterator.PluckProperty("name"));
// new TerraformLocal(this, "list-of-names-of-included", mapIterator.ForExpressionForList("val.name if val.included"));
// new TerraformLocal(this, "map-with-names-as-key-and-tags-as-value-of-included", mapIterator.ForExpressionForMap("val.name", "val.tags if val.included"));
// DOCS_BLOCK_END:iterators-for-expression
}
}
Expand Down

0 comments on commit 374abd3

Please sign in to comment.