Skip to content

Commit 91e1470

Browse files
update samples, fix build (#35)
1 parent 415306f commit 91e1470

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

src/SampleExtension/SampleExtension.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
<Compile Include="Properties\AssemblyInfo.cs" />
140140
</ItemGroup>
141141
<ItemGroup>
142-
<None Include="app.config" />
143142
<None Include="packages.config" />
144143
</ItemGroup>
145144
<ItemGroup>

src/SampleLibraryZeroTouch/Examples/BasicExample.cs

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,12 @@ public static BasicExample Create(double x=42.0, double y=42.0, double z=42.0)
126126

127127
/// <summary>
128128
/// The MultiReturn attribute can be used to specify
129-
/// the names of multiple output ports on a node that
130-
/// returns a dictionary. The node must return a dictionary
131-
/// to be recognized as a multi-out node.
129+
/// that a node is a multi-out node. This node must return
130+
/// a Dictionary with its keys matching the attributes specified in the
131+
/// MultiReturn attribute. The names of the output ports
132+
/// match the attribute names if there are no XML returns tags.
133+
/// The returned dictionary displayed in the node preview is displayed
134+
/// in the order of its keys as specified in the MultiReturn attribute.
132135
/// </summary>
133136
/// <returns></returns>
134137
[MultiReturn(new[] { "thing 1", "thing 2" })]
@@ -141,6 +144,30 @@ public static Dictionary<string, List<string>> MultiReturnExample()
141144
};
142145
}
143146

147+
/// <summary>
148+
/// The MultiReturn attribute can be used to specify
149+
/// that a node is a multi-out node. This node must return
150+
/// a Dictionary with its keys matching the attributes specified in the
151+
/// MultiReturn attribute. The names of the output ports
152+
/// match the XML returns tag only if they include descriptions.
153+
/// Otherwise the output ports will match the attribute names.
154+
/// The returned dictionary displayed in the node preview is displayed
155+
/// in the order of its keys as specified in the MultiReturn attribute.
156+
/// E.g. this node will display "thing1" and "thing2" in its output ports
157+
/// but it will show "thing 1" and "thing 2" in the node preview.
158+
/// </summary>
159+
/// <returns name="thing1">thing one</returns>
160+
/// <returns name="thing2">thing two</returns>
161+
[MultiReturn(new[] { "thing 1", "thing 2" })]
162+
public static Dictionary<string, List<string>> MultiReturnExample2()
163+
{
164+
return new Dictionary<string, List<string>>()
165+
{
166+
{ "thing 1", new List<string>{"apple", "banana", "cat"} },
167+
{ "thing 2", new List<string>{"Tywin", "Cersei", "Hodor"} }
168+
};
169+
}
170+
144171
/// <summary>
145172
/// OPTIONAL:
146173
/// Overriding ToString allows you to control what is

src/SampleLibraryZeroTouch/SampleLibraryZeroTouch.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<DefineConstants>DEBUG;TRACE</DefineConstants>
2525
<ErrorReport>prompt</ErrorReport>
2626
<WarningLevel>4</WarningLevel>
27-
<DocumentationFile>bin\Debug\$(UICulture)\SampleLibraryZeroTouch.XML</DocumentationFile>
27+
<DocumentationFile>bin\Debug\SampleLibraryZeroTouch.XML</DocumentationFile>
2828
<Prefer32Bit>false</Prefer32Bit>
2929
</PropertyGroup>
3030
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -34,7 +34,7 @@
3434
<DefineConstants>TRACE</DefineConstants>
3535
<ErrorReport>prompt</ErrorReport>
3636
<WarningLevel>4</WarningLevel>
37-
<DocumentationFile>bin\Release\$(UICulture)\SampleLibraryZeroTouch.XML</DocumentationFile>
37+
<DocumentationFile>bin\Release\SampleLibraryZeroTouch.XML</DocumentationFile>
3838
<Prefer32Bit>false</Prefer32Bit>
3939
</PropertyGroup>
4040
<ItemGroup>

0 commit comments

Comments
 (0)