Skip to content

Commit 7a911da

Browse files
committed
Refactoring Constants
1 parent 7a7988a commit 7a911da

11 files changed

+447
-617
lines changed

MTIP/Constants/ActivityConstants.cs

Lines changed: 26 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,67 +7,34 @@
77
*
88
*/
99

10-
using System;
11-
using System.Collections.Generic;
12-
using System.Linq;
13-
using System.Text;
14-
using System.Threading.Tasks;
15-
1610
namespace MTIP.Constants
1711
{
18-
public class ActivityConstants
12+
public static class ActivityConstants
1913
{
20-
public string acceptEventAction;
21-
public string action;
22-
public string actionPin;
23-
public string activity;
24-
public string activityParameter;
25-
public string activityPartion;
26-
public string callBehaviorAction;
27-
public string callOperationAction;
28-
public string centralBufferNode;
29-
public string change;
30-
public string conditionalNode;
31-
public string createObjectAction;
32-
public string decision;
33-
public string destroyObjectAction;
34-
public string eventType;
35-
public string forkNode;
36-
public string informationItem;
37-
public string interruptibleActivityRegion;
38-
public string mergeNode;
39-
public string objectNode;
40-
public string property;
41-
public string sendSignalAction;
42-
public string stateNode;
43-
public string synchronization;
44-
45-
46-
public ActivityConstants(){
47-
acceptEventAction = "AcceptEventAction";
48-
action = "Action";
49-
actionPin = "ActionPin";
50-
activity = "Activity";
51-
activityParameter = "ActivityParameter";
52-
activityPartion = "ActivityPartition";
53-
callBehaviorAction = "CallBehaviorAction";
54-
callOperationAction = "CallOperationAction";
55-
centralBufferNode = "CentralBufferNode";
56-
change = "Change";
57-
conditionalNode = "ConditionalNode";
58-
createObjectAction = "CreateObjectAction";
59-
decision = "Decision";
60-
destroyObjectAction = "DestroyObjectAction";
61-
eventType = "Event";
62-
forkNode = "ForkNode";
63-
informationItem = "InformationItem";
64-
interruptibleActivityRegion = "InterruptibleActivityRegion";
65-
mergeNode = "MergeNode";
66-
objectNode = "ObjectNode";
67-
property = "Property";
68-
sendSignalAction = "SendSignalAction";
69-
stateNode = "StateNode";
70-
synchronization = "Synchronization";
71-
}
14+
public const string ACCEPTEVENTACTION = "AcceptEventAction";
15+
public const string ACTION = "Action";
16+
public const string ACTIONPIN = "ActionPin";
17+
public const string ACTIVITY = "Activity";
18+
public const string ACTIVITYPARAMETER = "ActivityParameter";
19+
public const string ACTIVITYPARTION = "ActivityPartition";
20+
public const string CALLBEHAVIORACTION = "CallBehaviorAction";
21+
public const string CALLOPERATIONACTION = "CallOperationAction";
22+
public const string CENTRALBUFFERNODE = "CentralBufferNode";
23+
public const string CHANGE = "Change";
24+
public const string CONDITIONALNODE = "ConditionalNode";
25+
public const string CREATEOBJECTACTION = "CreateObjectAction";
26+
public const string DECISION = "Decision";
27+
public const string DESTROYOBJECTACTION = "DestroyObjectAction";
28+
public const string EVENTTYPE = "Event";
29+
public const string FORKNODE = "ForkNode";
30+
public const string INFORMATIONITEM = "InformationItem";
31+
public const string INTERRUPTIBLEACTIVITYREGION = "InterruptibleActivityRegion";
32+
public const string MERGENODE = "MergeNode";
33+
public const string OBJECTNODE = "ObjectNode";
34+
public const string PROPERTY = "Property";
35+
public const string SENDSIGNALACTION = "SendSignalAction";
36+
public const string STATENODE = "StateNode";
37+
public const string SYNCHRONIZATION = "Synchronization";
7238
}
7339
}
40+

MTIP/Constants/BlockConstants.cs

Lines changed: 20 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,28 @@
77
*
88
*/
99

10-
using System;
11-
using System.Collections.Generic;
12-
using System.Linq;
13-
using System.Text;
14-
using System.Threading.Tasks;
15-
1610
namespace MTIP.Constants
1711
{
18-
public class BlockConstants
12+
public static class BlockConstants
1913
{
20-
public string association;
21-
public string block;
22-
public string constraintBlock;
23-
public string dataType;
24-
public string enumeration;
25-
public string external;
26-
public string flowPort;
27-
public string fullPort;
28-
public string interfaceBlock;
29-
public string interfaceType;
30-
public string operation;
31-
public string port;
32-
public string property;
33-
public string proxyPort;
34-
public string quantityKind;
35-
public string signal;
36-
public string unit;
37-
public string valueType;
38-
public BlockConstants()
39-
{
40-
association = "Association";
41-
block = "Block";
42-
constraintBlock = "ConstraintBlock";
43-
dataType = "DataType";
44-
enumeration = "Enumeration";
45-
external = "External";
46-
flowPort = "FlowPort";
47-
fullPort = "FullPort";
48-
interfaceBlock = "InterfaceBlock";
49-
interfaceType = "Interface";
50-
operation = "Operation";
51-
port = "Port";
52-
property = "Property";
53-
proxyPort = "ProxyPort";
54-
quantityKind = "QuantityKind";
55-
signal = "Signal";
56-
unit = "Unit";
57-
valueType = "ValueType";
58-
}
14+
public const string ASSOCIATION = "Association";
15+
public const string BLOCK = "Block";
16+
public const string CONSTRAINTBLOCK = "ConstraintBlock";
17+
public const string DATATYPE = "DataType";
18+
public const string ENUMERATION = "Enumeration";
19+
public const string EXTERNAL = "External";
20+
public const string FLOWPORT = "FlowPort";
21+
public const string FULLPORT = "FullPort";
22+
public const string INTERFACEBLOCK = "InterfaceBlock";
23+
public const string INTERFACETYPE = "Interface";
24+
public const string OPERATION = "Operation";
25+
public const string PORT = "Port";
26+
public const string PROPERTY = "Property";
27+
public const string PROXYPORT = "ProxyPort";
28+
public const string QUANTITYKIND = "QuantityKind";
29+
public const string SIGNAL = "Signal";
30+
public const string UNIT = "Unit";
31+
public const string VALUETYPE = "ValueType";
5932
}
6033
}
34+

MTIP/Constants/DiagramConstants.cs

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,18 @@
1515

1616
namespace MTIP.Constants
1717
{
18-
public class DiagramConstants
18+
public static class DiagramConstants
1919
{
20-
public string activity;
21-
public string classType;
22-
public string component;
23-
public string compositeStructure;
24-
public string custom;
25-
public string logical;
26-
public string package;
27-
public string sequence;
28-
public string statechart;
29-
public string useCase;
30-
public DiagramConstants()
31-
{
32-
activity = "Activity";
33-
classType = "Class";
34-
component = "Component";
35-
compositeStructure = "CompositeStructure";
36-
custom = "Custom";
37-
logical = "Logical";
38-
package = "Package";
39-
sequence = "Sequence";
40-
statechart = "Statechart";
41-
useCase = "Use Case";
42-
}
20+
public const string activity = "Activity";
21+
public const string classType = "Class";
22+
public const string component = "Component";
23+
public const string compositeStructure = "CompositeStructure";
24+
public const string custom = "Custom";
25+
public const string logical = "Logical";
26+
public const string package = "Package";
27+
public const string sequence = "Sequence";
28+
public const string statechart = "Statechart";
29+
public const string useCase = "Use Case";
4330
}
31+
4432
}

MTIP/Constants/HUDSConstants.cs

Lines changed: 22 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,30 @@
77
*
88
*/
99

10-
using System;
11-
using System.Collections.Generic;
12-
using System.Linq;
13-
using System.Text;
14-
using System.Threading.Tasks;
15-
1610
namespace MTIP.Constants
1711
{
18-
public class HUDSConstants
12+
public static class HUDSConstants
1913
{
20-
public string attributes;
21-
public string data;
22-
public string dict;
23-
public string dtype;
24-
public string ea;
25-
public string unified;
26-
public string element;
27-
public string id;
28-
public string intType;
29-
public string isComposite;
30-
public string key;
31-
public string list;
32-
public string name;
33-
public string relationshipMetadata;
34-
public string relationships;
35-
public string status;
36-
public string str;
37-
public string type;
38-
public string typedBy;
39-
public string value;
40-
public HUDSConstants()
41-
{
42-
attributes = "attributes";
43-
data = "data";
44-
dict = "dict";
45-
dtype = "_dtype";
46-
ea = "ea";
47-
unified = "unified";
48-
element = "element";
49-
id = "id";
50-
intType = "int";
51-
isComposite = "isComposite";
52-
key = "key";
53-
list = "list";
54-
name = "name";
55-
relationshipMetadata = "relationship_metadata";
56-
relationships = "relationships";
57-
status = "status";
58-
str = "str";
59-
type = "type";
60-
typedBy = "typedBy";
61-
value = "value";
62-
}
14+
public const string ATTRIBUTES = "attributes";
15+
public const string DATA = "data";
16+
public const string DICT = "dict";
17+
public const string DTYPE = "_dtype";
18+
public const string EA = "ea";
19+
public const string UNIFIED = "unified";
20+
public const string ELEMENT = "element";
21+
public const string ID = "id";
22+
public const string INTTYPE = "int";
23+
public const string ISCOMPOSITE = "isComposite";
24+
public const string KEY = "key";
25+
public const string LIST = "list";
26+
public const string NAME = "name";
27+
public const string RELATIONSHIPMETADATA = "relationship_metadata";
28+
public const string RELATIONSHIPS = "relationships";
29+
public const string STATUS = "status";
30+
public const string STR = "str";
31+
public const string TYPE = "type";
32+
public const string TYPEDBY = "typedBy";
33+
public const string VALUE = "value";
6334
}
6435
}
36+

MTIP/Constants/InternalBlockConstants.cs

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,17 @@
77
*
88
*/
99

10-
using System;
11-
using System.Collections.Generic;
12-
using System.Linq;
13-
using System.Text;
14-
using System.Threading.Tasks;
15-
1610
namespace MTIP.Constants
1711
{
18-
public class InternalBlockConstants
12+
public static class InternalBlockConstants
1913
{
20-
public string boundary;
21-
public string boundReference;
22-
public string constraintProperty;
23-
public string flowProperty;
24-
public string participantProperty;
25-
public string property;
26-
public string referenceProperty;
27-
28-
public InternalBlockConstants()
29-
{
30-
boundary = "Boundary";
31-
boundReference = "BoundReference";
32-
constraintProperty = "ConstraintProperty";
33-
flowProperty = "FlowProperty";
34-
participantProperty = "ParticipantProperty";
35-
property = "Property";
36-
referenceProperty = "ReferenceProperty";
37-
}
14+
public const string BOUNDARY = "Boundary";
15+
public const string BOUNDREFERENCE = "BoundReference";
16+
public const string CONSTRAINTPROPERTY = "ConstraintProperty";
17+
public const string FLOWPROPERTY = "FlowProperty";
18+
public const string PARTICIPANTPROPERTY = "ParticipantProperty";
19+
public const string PROPERTY = "Property";
20+
public const string REFERENCEPROPERTY = "ReferenceProperty";
3821
}
3922
}
23+

MTIP/Constants/MetatypeConstants.cs

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,23 @@
99
*
1010
*/
1111

12-
using System;
13-
using System.Collections.Generic;
14-
using System.Linq;
15-
using System.Text;
16-
using System.Threading.Tasks;
12+
1713

1814
namespace MTIP.Constants
1915
{
20-
public class MetatypeConstants
16+
17+
public static class MetatypeConstants
2118
{
22-
public string acceptEventAction;
23-
public string callBehaviorAction;
24-
public string callOperationAction;
25-
public string createObjectAction;
26-
public string destroyObjectAction;
27-
public string inputPin;
28-
public string opaqueAction;
29-
public string outputPin;
30-
public string pseudostate;
31-
public string sendSignalAction;
32-
public MetatypeConstants()
33-
{
34-
acceptEventAction = "AcceptEventAction";
35-
callBehaviorAction = "CallBehaviorAction";
36-
callOperationAction = "CallOperationAction";
37-
createObjectAction = "CreateObjectAction";
38-
destroyObjectAction = "DestroyObjectAction";
39-
inputPin = "InputPin";
40-
opaqueAction = "OpaqueAction";
41-
outputPin = "OutputPin";
42-
pseudostate = "Pseudostate";
43-
sendSignalAction = "SendSignalAction";
44-
}
19+
public const string acceptEventAction = "AcceptEventAction";
20+
public const string callBehaviorAction = "CallBehaviorAction";
21+
public const string callOperationAction = "CallOperationAction";
22+
public const string createObjectAction = "CreateObjectAction";
23+
public const string destroyObjectAction = "DestroyObjectAction";
24+
public const string inputPin = "InputPin";
25+
public const string opaqueAction = "OpaqueAction";
26+
public const string outputPin = "OutputPin";
27+
public const string pseudostate = "Pseudostate";
28+
public const string sendSignalAction = "SendSignalAction";
4529
}
30+
4631
}

0 commit comments

Comments
 (0)