Skip to content

Commit ca70604

Browse files
committed
Updated DynamicValue from 'Name' to 'Source' and update unit tests
1 parent 6298c44 commit ca70604

44 files changed

Lines changed: 250 additions & 247 deletions

Some content is hidden

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

Synapse.Common/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838
// by using the '*' as shown below:
3939
// [assembly: AssemblyVersion("1.0.*")]
4040
[assembly: AssemblyVersion( "0.1.0.0" )]
41-
[assembly: AssemblyFileVersion( "0.1.18020.0" )]
41+
[assembly: AssemblyFileVersion( "0.1.18021.0" )]

Synapse.Core/Classes/DynamicValue.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ namespace Synapse.Core
55
{
66
public class DynamicValue : SourceTarget
77
{
8-
public string Name { get; set; }
98
public List<Option> Options { get; set; } = new List<Option>();
109

1110
public override string ToString()
1211
{
13-
return $"[Name:{Name}], Target:[{Target}], Parse:[{Parse}], Replace:[{Replace}], Encode:[{Encode}]";
12+
return $"[Name:{Source}], Target:[{Target}], Parse:[{Parse}], Replace:[{Replace}], Encode:[{Encode}]";
1413
}
1514

1615

1716
new public static DynamicValue CreateSample()
1817
{
1918
DynamicValue dv = new DynamicValue()
2019
{
21-
Name = "URI parameter name",
20+
Source = "URI parameter name",
2221
Target = "Element:IndexedElement[0]:Element",
2322
Parse = true,
2423
Encode = "None | Base64",

Synapse.Core/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737
// by using the '*' as shown below:
3838
// [assembly: AssemblyVersion("1.0.*")]
3939
[assembly: AssemblyVersion( "0.1.0.0" )]
40-
[assembly: AssemblyFileVersion( "0.1.18020.0" )]
40+
[assembly: AssemblyFileVersion( "0.1.18021.0" )]

Synapse.Core/Utilities/XmlHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ public static void Merge(ref XmlDocument source, List<DynamicValue> patch, Dicti
206206

207207
foreach( DynamicValue dv in patch )
208208
{
209-
if( values.ContainsKey( dv.Name ) )
209+
if( values.ContainsKey( dv.Source ) )
210210
{
211-
string value = values[dv.Name];
211+
string value = values[dv.Source];
212212

213213
XmlNode src = source.SelectSingleNode( dv.Target );
214214
if( src != null )

Synapse.Core/Utilities/YamlHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public static void Merge(ref Dictionary<object, object> source, List<DynamicValu
114114

115115
foreach( DynamicValue dv in dynamicValues )
116116
{
117-
if( values.ContainsKey( dv.Name ) )
117+
if( values.ContainsKey( dv.Source ) )
118118
{
119-
object value = dv.Parse ? TryParseValue( values[dv.Name] ) : values[dv.Name];
119+
object value = dv.Parse ? TryParseValue( values[dv.Source] ) : values[dv.Source];
120120
Dictionary<object, object> patch = ConvertPathElementToDict( dv.Target, value );
121121
ApplyPatchValues( source, patch, dv );
122122
}

Synapse.UnitTests/Plans/Parms/ped_out_json_0.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ Parameters:
3838
SleepMilliseconds: 2001
3939
ReturnStatus: Tombstoned
4040
Dynamic:
41-
- Name: ed
41+
- Options: []
42+
Source: ed
4243
Target: ExitData
4344
Parse: true
44-
Options: []
4545
ParentExitData:
4646
- CopyToValues:
4747
Source: Something:Wonderful:Stars

Synapse.UnitTests/Plans/Parms/ped_out_json_1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Parameters:
4444
SleepMilliseconds: 2001
4545
ReturnStatus: Tombstoned
4646
Dynamic:
47-
- Name: ed
47+
- Options: []
48+
Source: ed
4849
Target: ExitData
4950
Parse: true
50-
Options: []
5151
ParentExitData:
5252
- CopyToValues:
5353
Source: Something:Wonderful:Stars

Synapse.UnitTests/Plans/Parms/ped_out_xml_0.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Parameters:
4040
- - []
4141
- - []
4242
Dynamic:
43-
- Name: ed
43+
- Options: []
44+
Source: ed
4445
Target: /EmptyHandlerParameters/ExitData
45-
Options: []
4646
ParentExitData:
4747
- CopyToValues:
4848
Source: /Something/Wonderful/Stars

Synapse.UnitTests/Plans/Parms/ped_out_xml_1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Parameters:
4040
- - []
4141
- - []
4242
Dynamic:
43-
- Name: ed
43+
- Options: []
44+
Source: ed
4445
Target: /EmptyHandlerParameters/ExitData
45-
Options: []
4646
ParentExitData:
4747
- CopyToValues:
4848
Source: /Something/Wonderful/Stars

Synapse.UnitTests/Plans/Plans/RunAs0_out.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Actions:
2828
StartInfo:
2929
ParentExitData: &o1
3030
CurrentPrincipal: LAPTOP-TK2D9TB6\synapse0
31-
InstanceId: 104
31+
InstanceId: 105
3232
RunAs: *o0
3333
RunAs: &o2
3434
Domain: LAPTOP-TK2D9TB6
@@ -78,7 +78,7 @@ Actions:
7878
ExitData: *o1
7979
BranchStatus: Complete
8080
SecurityContext: LAPTOP-TK2D9TB6\synapse0
81-
InstanceId: 104
81+
InstanceId: 105
8282
- Name: 1
8383
Handler:
8484
Type: EchoHandler, Synapse.Core, Version=0.1.0.0, Culture=neutral, PublicKeyToken=a6de1cc56b73f982
@@ -93,7 +93,7 @@ Actions:
9393
StartInfo:
9494
ParentExitData: &o3
9595
CurrentPrincipal: LAPTOP-TK2D9TB6\synapse2
96-
InstanceId: 105
96+
InstanceId: 106
9797
RunAs: &o5
9898
Domain: LAPTOP-TK2D9TB6
9999
UserName: synapse2
@@ -127,18 +127,18 @@ Actions:
127127
Status: Complete
128128
ExitData:
129129
CurrentPrincipal: LAPTOP-TK2D9TB6\synapse2
130-
InstanceId: 106
130+
InstanceId: 109
131131
ParentExitData: *o3
132132
RunAs: *o4
133133
BranchStatus: Complete
134134
SecurityContext: LAPTOP-TK2D9TB6\synapse2
135-
InstanceId: 106
135+
InstanceId: 109
136136
Result:
137137
Status: Complete
138138
ExitData: *o3
139139
BranchStatus: Complete
140140
SecurityContext: LAPTOP-TK2D9TB6\synapse2
141-
InstanceId: 105
141+
InstanceId: 106
142142
RunAs: *o5
143143
Crypto:
144144
Key:
@@ -150,4 +150,4 @@ StartInfo: {}
150150
Result:
151151
Status: Complete
152152
BranchStatus: Complete
153-
LastModified: 1/20/2018 1:17:17 PM
153+
LastModified: 1/21/2018 11:56:44 AM

0 commit comments

Comments
 (0)