File size: 4,883 Bytes
b1b3bae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Namespace Flowsheet

    Public Class FlowsheetBag

        Implements IFlowsheetBag

        Dim _so As Dictionary(Of String, ISimulationObject)
        Dim _go As Dictionary(Of String, IGraphicObject)
        Dim _co As Dictionary(Of String, ICompoundConstantProperties)
        Dim _pp As Dictionary(Of String, IPropertyPackage)
        Dim _re As Dictionary(Of String, IReaction)
        Dim _rs As Dictionary(Of String, IReactionSet)

        Dim _surface As Object

        Sub New(so As Dictionary(Of String, ISimulationObject),
                go As Dictionary(Of String, IGraphicObject),
                co As Dictionary(Of String, ICompoundConstantProperties),
                pp As Dictionary(Of String, IPropertyPackage),
                re As Dictionary(Of String, IReaction),
                rs As Dictionary(Of String, IReactionSet))

            _so = so
            _go = go
            _co = co
            _pp = pp
            _re = re
            _rs = rs

        End Sub

        Public Property SimulationObjects As Dictionary(Of String, ISimulationObject) Implements IFlowsheetBag.SimulationObjects
            Get
                Return _so
            End Get
            Set(value As Dictionary(Of String, ISimulationObject))

            End Set
        End Property

        Public Property GraphicObjects As Dictionary(Of String, IGraphicObject) Implements IFlowsheetBag.GraphicObjects
            Get
                Return _go
            End Get
            Set(value As Dictionary(Of String, IGraphicObject))

            End Set
        End Property

        Public Property Compounds As Dictionary(Of String, ICompoundConstantProperties) Implements IFlowsheetBag.Compounds
            Get
                Return _co
            End Get
            Set(value As Dictionary(Of String, ICompoundConstantProperties))

            End Set
        End Property

        Public Property PropertyPackages As Dictionary(Of String, IPropertyPackage) Implements IFlowsheetBag.PropertyPackages
            Get
                Return _pp
            End Get
            Set(value As Dictionary(Of String, IPropertyPackage))

            End Set
        End Property

        Public Property Reactions As Dictionary(Of String, IReaction) Implements IFlowsheetBag.Reactions
            Get
                Return _re
            End Get
            Set(value As Dictionary(Of String, IReaction))

            End Set
        End Property

        Public Property ReactionSets As Dictionary(Of String, IReactionSet) Implements IFlowsheetBag.ReactionSets
            Get
                Return _rs
            End Get
            Set(value As Dictionary(Of String, IReactionSet))

            End Set
        End Property

        Public Property SimulationObjectsArray As ISimulationObject() Implements IFlowsheetBag.SimulationObjectsArray
            Get
                Return _so.Values.ToArray
            End Get
            Set(value As ISimulationObject())

            End Set
        End Property

        Public Property GraphicObjectsArray As IGraphicObject() Implements IFlowsheetBag.GraphicObjectsArray
            Get
                Return _go.Values.ToArray
            End Get
            Set(value As IGraphicObject())

            End Set
        End Property

        Public Property CompoundsArray As ICompoundConstantProperties() Implements IFlowsheetBag.CompoundsArray
            Get
                Return _co.Values.ToArray
            End Get
            Set(value As ICompoundConstantProperties())

            End Set
        End Property

        Public Property PropertyPackagesArray As IPropertyPackage() Implements IFlowsheetBag.PropertyPackagesArray
            Get
                Return _pp.Values.ToArray
            End Get
            Set(value As IPropertyPackage())

            End Set
        End Property

        Public Property ReactionsArray As IReaction() Implements IFlowsheetBag.ReactionsArray
            Get
                Return _re.Values.ToArray
            End Get
            Set(value As IReaction())

            End Set
        End Property

        Public Property ReactionSetsArray As IReactionSet() Implements IFlowsheetBag.ReactionSetsArray
            Get
                Return _rs.Values.ToArray
            End Get
            Set(value As IReactionSet())

            End Set
        End Property

        Public Overridable Sub SaveToXML(xfile As String) Implements IFlowsheetBag.SaveToXML
            Throw New NotImplementedException
        End Sub

        Public Overridable Sub UpdateProcessData(xdoc As XDocument) Implements IFlowsheetBag.UpdateProcessData
            Throw New NotImplementedException
        End Sub

        Public Function GetSurface() As Object Implements IFlowsheetBag.GetSurface
            Return _surface
        End Function

    End Class

End Namespace