Skip to content

Commit 14465c1

Browse files
committed
Initial release of Azure Queue Storage
1 parent 322136e commit 14465c1

File tree

61 files changed

+5689
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5689
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Intent Architect
2+
3+
**/.intent/*
4+
!*.application.output.log
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using Intent.Metadata.Models;
5+
using Intent.Modelers.Eventing.Api;
6+
using Intent.Modules.Common;
7+
using Intent.RoslynWeaver.Attributes;
8+
9+
[assembly: DefaultIntentManaged(Mode.Fully)]
10+
[assembly: IntentTemplate("Intent.ModuleBuilder.Templates.Api.ApiElementModelExtensions", Version = "1.0")]
11+
12+
namespace Intent.Eventing.AzureQueueStorage.Api
13+
{
14+
public static class MessageModelStereotypeExtensions
15+
{
16+
public static AzureQueueStorage GetAzureQueueStorage(this MessageModel model)
17+
{
18+
var stereotype = model.GetStereotype(AzureQueueStorage.DefinitionId);
19+
return stereotype != null ? new AzureQueueStorage(stereotype) : null;
20+
}
21+
22+
23+
public static bool HasAzureQueueStorage(this MessageModel model)
24+
{
25+
return model.HasStereotype(AzureQueueStorage.DefinitionId);
26+
}
27+
28+
public static bool TryGetAzureQueueStorage(this MessageModel model, out AzureQueueStorage stereotype)
29+
{
30+
if (!HasAzureQueueStorage(model))
31+
{
32+
stereotype = null;
33+
return false;
34+
}
35+
36+
stereotype = new AzureQueueStorage(model.GetStereotype(AzureQueueStorage.DefinitionId));
37+
return true;
38+
}
39+
40+
public class AzureQueueStorage
41+
{
42+
private IStereotype _stereotype;
43+
public const string DefinitionId = "7b57f640-600d-4b91-98a7-2a304c715f27";
44+
45+
public AzureQueueStorage(IStereotype stereotype)
46+
{
47+
_stereotype = stereotype;
48+
}
49+
50+
public string Name => _stereotype.Name;
51+
52+
public string QueueName()
53+
{
54+
return _stereotype.GetProperty<string>("Queue Name");
55+
}
56+
57+
}
58+
59+
}
60+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package>
3+
<id>Intent.Eventing.AzureQueueStorage</id>
4+
<version>1.0.0-beta.1</version>
5+
<supportedClientVersions>[4.4.0-a,5.0.0)</supportedClientVersions>
6+
<summary>Provides patterns for using Azure Queue Storage, which can be modeled in Intent Architect's designers.</summary>
7+
<description>Provides patterns for using Azure Queue Storage, which can be modeled in Intent Architect's designers.</description>
8+
<authors>Intent.Modules.NET</authors>
9+
<iconUrl>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAFrklEQVR4AeyZz4scRRTHX8+P3U02B1FQ4kH8A/wRL4asehBRz0EIouJRz54WvYkgQvSuf4LXgAjiURZPCopEjXgSXATRJLCbzezM5H1ru6urX29X99Sb2d3JvqVe16/3vvXq09XTTdIj+1MRMIAqfEQG0AAqCSjD7QQaQCUBZbidQAOoJKAMtxM4b4AfXPzzkc1L1580qzMAG8nbn8D3n73+0ObGH9+O+5NtyoY/mdUZgM3mxo1v3rv0y4MFSA9w3B+8w4MvsVmJEsheHtLKu4WLB0gZrRaD93mt317AqqdXO90KBlB5/w2gAVQSUIbbCTSASgLKcDuBBlBJQBluJ9AAKgkow/0JXDvbo5UzfbMODMCK8j8P8OLlR2njNbMuDMAq57cs/61ZpHvyan8CT15qy5GRAVTep5kBrq5nlGrD1Xq2GBuuESXZIXr9AdFgmG71DOMjvfh0dXa4ltGLbw+T7fnXeWdVSbrwyoCeeTXNnuZYIUePPdGnxy+kW78vFeP9mQCu8EmJy8VnV89mNYdspgyq4b1DYvv1e1QNaun1hvUcYyGHpBBztzlJwABKIjP2DeCMwKR7BeB0OqU2kwKz9qU+TVlBYYvWk/roc8a+lAAn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ikBci9G3ebKXx9G5YsH6KDayWNKzKaFg2PFbigeYDbN7rTE2VPNxMAIrLjpigc4He9/QdNsi+BhFjmJ2XdnBuufO3p88QDf/OSB/974eP25wYjOT/r0lFmdwWC0c54ZvXD5w+x/ZueKB+h6fLly9dz2Wx+d+9mszuDK1Ye3GVGl1ABWZq3TSsAAtiKKOxjAOJ/WWQPYiijusIwA4zs64lkDqARuAA2gkoAy/B4AAAD//7SZOuoAAAAGSURBVAMADO9PRrZU9CQAAAAASUVORK5CYII=</iconUrl>
10+
<templates>
11+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageConfiguration" externalReference="0d380ac5-2a50-430f-9e21-78dc2ddff0c7">
12+
<config>
13+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
14+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
15+
</config>
16+
<role>Infrastructure.DependencyInjection.AzureQueueStorageConfiguration</role>
17+
<location>Configuration</location>
18+
</template>
19+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageConsumer" externalReference="3f2d1688-d15b-4c2c-8d37-d4611c283e71">
20+
<config>
21+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
22+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
23+
</config>
24+
<role>Infrastructure.Eventing.Consumer</role>
25+
<location>Eventing</location>
26+
</template>
27+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageConsumerBackgroundService" externalReference="d6de0950-e693-4e5d-a17e-8e5d96792154">
28+
<config>
29+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
30+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
31+
</config>
32+
<role>Infrastructure.Eventing.Consumer</role>
33+
<location>Eventing</location>
34+
</template>
35+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageConsumerInterface" externalReference="15e4634c-be40-4f11-9de3-e20c2fed2994">
36+
<config>
37+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
38+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
39+
</config>
40+
<role>Infrastructure.Eventing.Consumer</role>
41+
<location>Eventing</location>
42+
</template>
43+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageEventBus" externalReference="c6285182-215e-491d-a359-2ce1c5174949">
44+
<config>
45+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
46+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
47+
</config>
48+
<role>Infrastructure.Eventing.AzureQueueStorageEventBus</role>
49+
<location>Eventing</location>
50+
</template>
51+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageEventDispatcher" externalReference="c6a6f2af-8790-4310-ab87-b55e0866f8c3">
52+
<config>
53+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
54+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
55+
</config>
56+
<role>Infrastructure.Eventing.Consumer</role>
57+
<location>Eventing</location>
58+
</template>
59+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageEventDispatcherInterface" externalReference="a71d9b4b-2b02-4c12-86be-d9aab128019d">
60+
<config>
61+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
62+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
63+
</config>
64+
<role>Infrastructure.Eventing.Consumer</role>
65+
<location>Eventing</location>
66+
</template>
67+
<template id="Intent.Eventing.AzureQueueStorage.AzureQueueStorageOptions" externalReference="5ee741b9-6257-4a91-8b6c-1a9e15264957">
68+
<config>
69+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
70+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
71+
</config>
72+
<role>Infrastructure.DependencyInjection.AzureQueueStorageOptions</role>
73+
<location>Configuration</location>
74+
</template>
75+
<template id="Intent.Eventing.AzureQueueStorage.IntegrationEventHandler" externalReference="9c36bf3d-d160-43fa-a0f6-f643552aea59">
76+
<config>
77+
<add key="ClassName" description="Class name formula override (e.g. '${Model.Name}')" />
78+
<add key="Namespace" description="Class namespace formula override (e.g. '${Project.Name}'" />
79+
</config>
80+
<role>Application.Eventing.EventHandler</role>
81+
<location>IntegrationEvents/EventHandlers</location>
82+
</template>
83+
</templates>
84+
<decorators></decorators>
85+
<factoryExtensions></factoryExtensions>
86+
<moduleSettings></moduleSettings>
87+
<dependencies>
88+
<dependency id="Intent.Common" version="3.8.0" />
89+
<dependency id="Intent.Common.CSharp" version="3.8.0" />
90+
<dependency id="Intent.Common.Types" version="3.4.0" />
91+
<dependency id="Intent.Common.UnitOfWork" version="1.0.2" />
92+
<dependency id="Intent.Eventing.Contracts" version="5.2.0" />
93+
<dependency id="Intent.Modelers.Eventing" version="6.0.1" />
94+
<dependency id="Intent.Modelers.Services" version="4.0.5" />
95+
<dependency id="Intent.OutputManager.RoslynWeaver" version="4.5.1" />
96+
</dependencies>
97+
<files>
98+
<file src="$outDir$/$id$.dll" />
99+
<file src="$outDir$/$id$.pdb" />
100+
</files>
101+
<tags />
102+
<releaseNotes>release-notes.md</releaseNotes>
103+
<moduleSettingsExtensions />
104+
<metadata>
105+
<install target="Services" src="Intent.Metadata/Module Builder/Intent.Eventing.AzureQueueStorage/Intent.Eventing.AzureQueueStorage.pkg.config" externalReference="f924ae65-9274-415c-a1c4-9682f8b463d1" />
106+
</metadata>
107+
<migrations />
108+
</package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<class id="0d380ac5-2a50-430f-9e21-78dc2ddff0c7" type="C# Template" typeId="f6456232-0f1b-4235-b5f8-b4cce548ca59">
3+
<name>AzureQueueStorageConfiguration</name>
4+
<display>AzureQueueStorageConfiguration: Single File</display>
5+
<isAbstract>false</isAbstract>
6+
<genericTypes />
7+
<typeReference id="3f32c84f-d66c-44cd-acc0-22f84947e2aa">
8+
<typeId>f65d2904-88c9-4501-873a-a4eec8303b1d</typeId>
9+
<isNavigable>true</isNavigable>
10+
<isNullable>false</isNullable>
11+
<isCollection>false</isCollection>
12+
<isRequired>true</isRequired>
13+
<typePackageName>Intent.ModuleBuilder</typePackageName>
14+
<typePackageId>9972b2a9-b749-4bba-b5c8-824bf694c6ef</typePackageId>
15+
<stereotypes />
16+
<genericTypeParameters />
17+
</typeReference>
18+
<isMapped>false</isMapped>
19+
<parentFolderId>f924ae65-9274-415c-a1c4-9682f8b463d1</parentFolderId>
20+
<packageId>f924ae65-9274-415c-a1c4-9682f8b463d1</packageId>
21+
<packageName>Intent.Eventing.AzureQueueStorage</packageName>
22+
<stereotypes>
23+
<stereotype stereotypeDefinitionId="78be0482-1cd7-4b9f-b457-5ebe1536786e" name="C# Template Settings">
24+
<addedByDefault>true</addedByDefault>
25+
<definitionPackageName>Intent.ModuleBuilder.CSharp</definitionPackageName>
26+
<definitionPackageId>f2bfb0f7-d304-466f-b923-021d4016b48d</definitionPackageId>
27+
<properties>
28+
<property name="3b9e1f1b-e253-4c04-89aa-30fef0a9bfa8" display="Templating Method" value="C# File Builder" isActive="true" />
29+
</properties>
30+
</stereotype>
31+
<stereotype stereotypeDefinitionId="b1f08a30-9aae-4702-bfc8-e285e6b43a61" name="Template Settings">
32+
<addedByDefault>true</addedByDefault>
33+
<definitionPackageName>Intent.ModuleBuilder</definitionPackageName>
34+
<definitionPackageId>9972b2a9-b749-4bba-b5c8-824bf694c6ef</definitionPackageId>
35+
<properties>
36+
<property name="a9de6cf5-6d4f-4ae1-aa60-5ca85e458709" display="Source" value="Lookup Type" isActive="true" />
37+
<property name="00d3537c-f71f-4450-8cc8-d9e87c12baee" display="Designer" isActive="true" />
38+
<property name="75b89367-1808-43f8-9f18-785915ec1630" display="Model Type" isActive="true" />
39+
<property name="d1e89313-0647-48bd-81da-b04b644db475" display="Model Name" value="object" isActive="false" />
40+
<property name="f1d88e59-1ca6-426e-b52d-42f3467e6bd5" display="Role" value="Infrastructure.DependencyInjection.AzureQueueStorageConfiguration" isActive="true" />
41+
<property name="1ac0fa39-ecea-48f8-92e4-41616a639586" display="Default Location" value="Configuration" isActive="true" />
42+
</properties>
43+
</stereotype>
44+
</stereotypes>
45+
<metadata />
46+
<childElements />
47+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<class id="d6de0950-e693-4e5d-a17e-8e5d96792154" type="C# Template" typeId="f6456232-0f1b-4235-b5f8-b4cce548ca59">
3+
<name>AzureQueueStorageConsumerBackgroundService</name>
4+
<display>AzureQueueStorageConsumerBackgroundService: Single File</display>
5+
<isAbstract>false</isAbstract>
6+
<genericTypes />
7+
<typeReference id="89542584-3638-49e6-a140-750471c09350">
8+
<typeId>f65d2904-88c9-4501-873a-a4eec8303b1d</typeId>
9+
<isNavigable>true</isNavigable>
10+
<isNullable>false</isNullable>
11+
<isCollection>false</isCollection>
12+
<isRequired>true</isRequired>
13+
<typePackageName>Intent.ModuleBuilder</typePackageName>
14+
<typePackageId>9972b2a9-b749-4bba-b5c8-824bf694c6ef</typePackageId>
15+
<stereotypes />
16+
<genericTypeParameters />
17+
</typeReference>
18+
<isMapped>false</isMapped>
19+
<parentFolderId>f924ae65-9274-415c-a1c4-9682f8b463d1</parentFolderId>
20+
<packageId>f924ae65-9274-415c-a1c4-9682f8b463d1</packageId>
21+
<packageName>Intent.Eventing.AzureQueueStorage</packageName>
22+
<stereotypes>
23+
<stereotype stereotypeDefinitionId="78be0482-1cd7-4b9f-b457-5ebe1536786e" name="C# Template Settings">
24+
<addedByDefault>true</addedByDefault>
25+
<definitionPackageName>Intent.ModuleBuilder.CSharp</definitionPackageName>
26+
<definitionPackageId>f2bfb0f7-d304-466f-b923-021d4016b48d</definitionPackageId>
27+
<properties>
28+
<property name="3b9e1f1b-e253-4c04-89aa-30fef0a9bfa8" display="Templating Method" value="C# File Builder" isActive="true" />
29+
</properties>
30+
</stereotype>
31+
<stereotype stereotypeDefinitionId="b1f08a30-9aae-4702-bfc8-e285e6b43a61" name="Template Settings">
32+
<addedByDefault>true</addedByDefault>
33+
<definitionPackageName>Intent.ModuleBuilder</definitionPackageName>
34+
<definitionPackageId>9972b2a9-b749-4bba-b5c8-824bf694c6ef</definitionPackageId>
35+
<properties>
36+
<property name="a9de6cf5-6d4f-4ae1-aa60-5ca85e458709" display="Source" value="Lookup Type" isActive="true" />
37+
<property name="00d3537c-f71f-4450-8cc8-d9e87c12baee" display="Designer" isActive="true" />
38+
<property name="75b89367-1808-43f8-9f18-785915ec1630" display="Model Type" isActive="true" />
39+
<property name="d1e89313-0647-48bd-81da-b04b644db475" display="Model Name" value="object" isActive="false" />
40+
<property name="f1d88e59-1ca6-426e-b52d-42f3467e6bd5" display="Role" value="Infrastructure.Eventing.Consumer" isActive="true" />
41+
<property name="1ac0fa39-ecea-48f8-92e4-41616a639586" display="Default Location" value="Eventing" isActive="true" />
42+
</properties>
43+
</stereotype>
44+
</stereotypes>
45+
<metadata />
46+
<childElements />
47+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<class id="15e4634c-be40-4f11-9de3-e20c2fed2994" type="C# Template" typeId="f6456232-0f1b-4235-b5f8-b4cce548ca59">
3+
<name>AzureQueueStorageConsumerInterface</name>
4+
<display>AzureQueueStorageConsumerInterface: Single File</display>
5+
<isAbstract>false</isAbstract>
6+
<genericTypes />
7+
<typeReference id="169ca189-837b-4a7a-8d61-5ff3ba276c30">
8+
<typeId>f65d2904-88c9-4501-873a-a4eec8303b1d</typeId>
9+
<isNavigable>true</isNavigable>
10+
<isNullable>false</isNullable>
11+
<isCollection>false</isCollection>
12+
<isRequired>true</isRequired>
13+
<typePackageName>Intent.ModuleBuilder</typePackageName>
14+
<typePackageId>9972b2a9-b749-4bba-b5c8-824bf694c6ef</typePackageId>
15+
<stereotypes />
16+
<genericTypeParameters />
17+
</typeReference>
18+
<isMapped>false</isMapped>
19+
<parentFolderId>f924ae65-9274-415c-a1c4-9682f8b463d1</parentFolderId>
20+
<packageId>f924ae65-9274-415c-a1c4-9682f8b463d1</packageId>
21+
<packageName>Intent.Eventing.AzureQueueStorage</packageName>
22+
<stereotypes>
23+
<stereotype stereotypeDefinitionId="78be0482-1cd7-4b9f-b457-5ebe1536786e" name="C# Template Settings">
24+
<addedByDefault>true</addedByDefault>
25+
<definitionPackageName>Intent.ModuleBuilder.CSharp</definitionPackageName>
26+
<definitionPackageId>f2bfb0f7-d304-466f-b923-021d4016b48d</definitionPackageId>
27+
<properties>
28+
<property name="3b9e1f1b-e253-4c04-89aa-30fef0a9bfa8" display="Templating Method" value="C# File Builder" isActive="true" />
29+
</properties>
30+
</stereotype>
31+
<stereotype stereotypeDefinitionId="b1f08a30-9aae-4702-bfc8-e285e6b43a61" name="Template Settings">
32+
<addedByDefault>true</addedByDefault>
33+
<definitionPackageName>Intent.ModuleBuilder</definitionPackageName>
34+
<definitionPackageId>9972b2a9-b749-4bba-b5c8-824bf694c6ef</definitionPackageId>
35+
<properties>
36+
<property name="a9de6cf5-6d4f-4ae1-aa60-5ca85e458709" display="Source" value="Lookup Type" isActive="true" />
37+
<property name="00d3537c-f71f-4450-8cc8-d9e87c12baee" display="Designer" isActive="true" />
38+
<property name="75b89367-1808-43f8-9f18-785915ec1630" display="Model Type" isActive="true" />
39+
<property name="d1e89313-0647-48bd-81da-b04b644db475" display="Model Name" value="object" isActive="false" />
40+
<property name="f1d88e59-1ca6-426e-b52d-42f3467e6bd5" display="Role" value="Infrastructure.Eventing.Consumer" isActive="true" />
41+
<property name="1ac0fa39-ecea-48f8-92e4-41616a639586" display="Default Location" value="Eventing" isActive="true" />
42+
</properties>
43+
</stereotype>
44+
</stereotypes>
45+
<metadata />
46+
<childElements />
47+
</class>

0 commit comments

Comments
 (0)