mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 03:57:08 +00:00
Added Stop() method to Gather to allow the gather to be shut down
This commit is contained in:
parent
d5970f76ce
commit
a99a69b4bb
7 changed files with 17 additions and 7 deletions
|
|
@ -65,7 +65,17 @@ namespace PepperDash.Core
|
|||
{
|
||||
Port = port;
|
||||
StringDelimiter = delimiter;
|
||||
port.TextReceived += TextReceivedStringDelimiter;
|
||||
port.TextReceived += Port_TextReceivedStringDelimiter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnects this gather from the Port's TextReceived event. This will not fire LineReceived
|
||||
/// after the this call.
|
||||
/// </summary>
|
||||
public void Stop()
|
||||
{
|
||||
Port.TextReceived -= Port_TextReceived;
|
||||
Port.TextReceived -= Port_TextReceivedStringDelimiter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -93,7 +103,7 @@ namespace PepperDash.Core
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
void TextReceivedStringDelimiter(object sender, GenericCommMethodReceiveTextArgs args)
|
||||
void Port_TextReceivedStringDelimiter(object sender, GenericCommMethodReceiveTextArgs args)
|
||||
{
|
||||
var handler = LineReceived;
|
||||
if (handler != null)
|
||||
|
|
@ -118,7 +128,7 @@ namespace PepperDash.Core
|
|||
/// </summary>
|
||||
~CommunicationGather()
|
||||
{
|
||||
Port.TextReceived -= Port_TextReceived;
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<Programmer />
|
||||
<ArchiveFilename>C:\Users\hvolm\Desktop\working\pepperdash-simplsharp-core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.clz</ArchiveFilename>
|
||||
<MinFirmwareVersion>1.007.0017</MinFirmwareVersion>
|
||||
<CompiledOn>9/23/2016 9:37:04 AM</CompiledOn>
|
||||
<CompiledOn>9/26/2016 8:35:29 AM</CompiledOn>
|
||||
<AdditionalInfo />
|
||||
<EmbedSourceArchive>False</EmbedSourceArchive>
|
||||
<CopyTo />
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -10,7 +10,7 @@
|
|||
<ArchiveName />
|
||||
</RequiredInfo>
|
||||
<OptionalInfo>
|
||||
<CompiledOn>9/23/2016 9:37:04 AM</CompiledOn>
|
||||
<CompilerRev>1.0.0.15511</CompilerRev>
|
||||
<CompiledOn>9/26/2016 8:35:29 AM</CompiledOn>
|
||||
<CompilerRev>1.0.0.13663</CompilerRev>
|
||||
</OptionalInfo>
|
||||
</ProgramInfo>
|
||||
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
MainAssembly=PepperDash_Core.dll:ebb9549e48b1f82bec0efdb69443c915
|
||||
MainAssembly=PepperDash_Core.dll:03807ccdf300afd429e7566545de5e6c
|
||||
MainAssemblyMinFirmwareVersion=1.007.0017
|
||||
ü
|
||||
DependencySource=Newtonsoft.Json.Compact.dll:ea996aa2ec65aa1878e7c9d09e37a896
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue