1 | //------------------------------------------------------------------------------
|
---|
2 | // <auto-generated>
|
---|
3 | // This code was generated by a tool.
|
---|
4 | //
|
---|
5 | // Changes to this file may cause incorrect behavior and will be lost if
|
---|
6 | // the code is regenerated.
|
---|
7 | // </auto-generated>
|
---|
8 | //------------------------------------------------------------------------------
|
---|
9 |
|
---|
10 | using DslModeling = global::Microsoft.VisualStudio.Modeling;
|
---|
11 | using DslDesign = global::Microsoft.VisualStudio.Modeling.Design;
|
---|
12 | namespace HeuristicLab.SimulationCore
|
---|
13 | {
|
---|
14 | /// <summary>
|
---|
15 | /// DomainClass SimulationModel
|
---|
16 | /// The root in which all other elements are embedded. Appears as a diagram.
|
---|
17 | /// </summary>
|
---|
18 | [DslDesign::DisplayNameResource("HeuristicLab.SimulationCore.SimulationModel.DisplayName", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
19 | [DslDesign::DescriptionResource("HeuristicLab.SimulationCore.SimulationModel.Description", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
20 | [DslModeling::DomainModelOwner(typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel))]
|
---|
21 | [global::System.CLSCompliant(true)]
|
---|
22 | [DslModeling::DomainObjectId("bf3fdcd7-a552-4140-a502-130d51fa2a89")]
|
---|
23 | public partial class SimulationModel : DslModeling::ModelElement
|
---|
24 | {
|
---|
25 | #region Constructors, domain class Id
|
---|
26 |
|
---|
27 | /// <summary>
|
---|
28 | /// SimulationModel domain class Id.
|
---|
29 | /// </summary>
|
---|
30 | public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xbf3fdcd7, 0xa552, 0x4140, 0xa5, 0x02, 0x13, 0x0d, 0x51, 0xfa, 0x2a, 0x89);
|
---|
31 | /// <summary>
|
---|
32 | /// Constructor
|
---|
33 | /// </summary>
|
---|
34 | /// <param name="store">Store where new element is to be created.</param>
|
---|
35 | /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
|
---|
36 | public SimulationModel(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
|
---|
37 | : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
|
---|
38 | {
|
---|
39 | }
|
---|
40 |
|
---|
41 | /// <summary>
|
---|
42 | /// Constructor
|
---|
43 | /// </summary>
|
---|
44 | /// <param name="partition">Partition where new element is to be created.</param>
|
---|
45 | /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
|
---|
46 | public SimulationModel(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
|
---|
47 | : base(partition, propertyAssignments)
|
---|
48 | {
|
---|
49 | }
|
---|
50 | #endregion
|
---|
51 | #region ModelType domain property code
|
---|
52 |
|
---|
53 | /// <summary>
|
---|
54 | /// ModelType domain property Id.
|
---|
55 | /// </summary>
|
---|
56 | public static readonly global::System.Guid ModelTypeDomainPropertyId = new global::System.Guid(0x495a3211, 0xd774, 0x4434, 0x8b, 0xd1, 0x7b, 0x34, 0x00, 0x49, 0xf9, 0xe9);
|
---|
57 |
|
---|
58 | /// <summary>
|
---|
59 | /// Storage for ModelType
|
---|
60 | /// </summary>
|
---|
61 | private global::System.String modelTypePropertyStorage = string.Empty;
|
---|
62 |
|
---|
63 | /// <summary>
|
---|
64 | /// Gets or sets the value of ModelType domain property.
|
---|
65 | /// Description for HeuristicLab.SimulationCore.SimulationModel.Model Type
|
---|
66 | /// </summary>
|
---|
67 | [DslDesign::DisplayNameResource("HeuristicLab.SimulationCore.SimulationModel/ModelType.DisplayName", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
68 | [DslDesign::DescriptionResource("HeuristicLab.SimulationCore.SimulationModel/ModelType.Description", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
69 | [DslModeling::DomainObjectId("495a3211-d774-4434-8bd1-7b340049f9e9")]
|
---|
70 | public global::System.String ModelType
|
---|
71 | {
|
---|
72 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
73 | get
|
---|
74 | {
|
---|
75 | return modelTypePropertyStorage;
|
---|
76 | }
|
---|
77 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
78 | set
|
---|
79 | {
|
---|
80 | ModelTypePropertyHandler.Instance.SetValue(this, value);
|
---|
81 | }
|
---|
82 | }
|
---|
83 | /// <summary>
|
---|
84 | /// Value handler for the SimulationModel.ModelType domain property.
|
---|
85 | /// </summary>
|
---|
86 | internal sealed partial class ModelTypePropertyHandler : DslModeling::DomainPropertyValueHandler<SimulationModel, global::System.String>
|
---|
87 | {
|
---|
88 | private ModelTypePropertyHandler() { }
|
---|
89 |
|
---|
90 | /// <summary>
|
---|
91 | /// Gets the singleton instance of the SimulationModel.ModelType domain property value handler.
|
---|
92 | /// </summary>
|
---|
93 | public static readonly ModelTypePropertyHandler Instance = new ModelTypePropertyHandler();
|
---|
94 |
|
---|
95 | /// <summary>
|
---|
96 | /// Gets the Id of the SimulationModel.ModelType domain property.
|
---|
97 | /// </summary>
|
---|
98 | public sealed override global::System.Guid DomainPropertyId
|
---|
99 | {
|
---|
100 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
101 | get
|
---|
102 | {
|
---|
103 | return ModelTypeDomainPropertyId;
|
---|
104 | }
|
---|
105 | }
|
---|
106 |
|
---|
107 | /// <summary>
|
---|
108 | /// Gets a strongly-typed value of the property on specified element.
|
---|
109 | /// </summary>
|
---|
110 | /// <param name="element">Element which owns the property.</param>
|
---|
111 | /// <returns>Property value.</returns>
|
---|
112 | public override sealed global::System.String GetValue(SimulationModel element)
|
---|
113 | {
|
---|
114 | if (element == null) throw new global::System.ArgumentNullException("element");
|
---|
115 | return element.modelTypePropertyStorage;
|
---|
116 | }
|
---|
117 |
|
---|
118 | /// <summary>
|
---|
119 | /// Sets property value on an element.
|
---|
120 | /// </summary>
|
---|
121 | /// <param name="element">Element which owns the property.</param>
|
---|
122 | /// <param name="newValue">New property value.</param>
|
---|
123 | public override sealed void SetValue(SimulationModel element, global::System.String newValue)
|
---|
124 | {
|
---|
125 | if (element == null) throw new global::System.ArgumentNullException("element");
|
---|
126 |
|
---|
127 | global::System.String oldValue = GetValue(element);
|
---|
128 | if (newValue != oldValue)
|
---|
129 | {
|
---|
130 | ValueChanging(element, oldValue, newValue);
|
---|
131 | element.modelTypePropertyStorage = newValue;
|
---|
132 | ValueChanged(element, oldValue, newValue);
|
---|
133 | }
|
---|
134 | }
|
---|
135 | }
|
---|
136 |
|
---|
137 | #endregion
|
---|
138 | #region Activities opposite domain role accessor
|
---|
139 |
|
---|
140 | /// <summary>
|
---|
141 | /// Gets a list of Activities.
|
---|
142 | /// Description for
|
---|
143 | /// HeuristicLab.SimulationCore.SimulationModelHasActivities.SimulationModel
|
---|
144 | /// </summary>
|
---|
145 | public virtual DslModeling::LinkedElementCollection<Activity> Activities
|
---|
146 | {
|
---|
147 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
148 | get
|
---|
149 | {
|
---|
150 | return GetRoleCollection<DslModeling::LinkedElementCollection<Activity>, Activity>(global::HeuristicLab.SimulationCore.SimulationModelHasActivities.SimulationModelDomainRoleId);
|
---|
151 | }
|
---|
152 | }
|
---|
153 | #endregion
|
---|
154 | #region Actions opposite domain role accessor
|
---|
155 |
|
---|
156 | /// <summary>
|
---|
157 | /// Gets a list of Actions.
|
---|
158 | /// Description for
|
---|
159 | /// HeuristicLab.SimulationCore.SimulationModelHasActions.SimulationModel
|
---|
160 | /// </summary>
|
---|
161 | public virtual DslModeling::LinkedElementCollection<Action> Actions
|
---|
162 | {
|
---|
163 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
164 | get
|
---|
165 | {
|
---|
166 | return GetRoleCollection<DslModeling::LinkedElementCollection<Action>, Action>(global::HeuristicLab.SimulationCore.SimulationModelHasActions.SimulationModelDomainRoleId);
|
---|
167 | }
|
---|
168 | }
|
---|
169 | #endregion
|
---|
170 | #region ElementGroupPrototype Merge methods
|
---|
171 | /// <summary>
|
---|
172 | /// Returns a value indicating whether the source element represented by the
|
---|
173 | /// specified root ProtoElement can be added to this element.
|
---|
174 | /// </summary>
|
---|
175 | /// <param name="rootElement">
|
---|
176 | /// The root ProtoElement representing a source element. This can be null,
|
---|
177 | /// in which case the ElementGroupPrototype does not contain an ProtoElements
|
---|
178 | /// and the code should inspect the ElementGroupPrototype context information.
|
---|
179 | /// </param>
|
---|
180 | /// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param>
|
---|
181 | /// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns>
|
---|
182 | protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype)
|
---|
183 | {
|
---|
184 | if ( elementGroupPrototype == null ) throw new global::System.ArgumentNullException("elementGroupPrototype");
|
---|
185 |
|
---|
186 | if (rootElement != null)
|
---|
187 | {
|
---|
188 | DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId);
|
---|
189 |
|
---|
190 | if (rootElementDomainInfo.IsDerivedFrom(global::HeuristicLab.SimulationCore.Activity.DomainClassId))
|
---|
191 | {
|
---|
192 | return true;
|
---|
193 | }
|
---|
194 |
|
---|
195 | if (rootElementDomainInfo.IsDerivedFrom(global::HeuristicLab.SimulationCore.Action.DomainClassId))
|
---|
196 | {
|
---|
197 | return true;
|
---|
198 | }
|
---|
199 | }
|
---|
200 | return base.CanMerge(rootElement, elementGroupPrototype);
|
---|
201 | }
|
---|
202 |
|
---|
203 | /// <summary>
|
---|
204 | /// Called by the Merge process to create a relationship between
|
---|
205 | /// this target element and the specified source element.
|
---|
206 | /// Typically, a parent-child relationship is established
|
---|
207 | /// between the target element (the parent) and the source element
|
---|
208 | /// (the child), but any relationship can be established.
|
---|
209 | /// </summary>
|
---|
210 | /// <param name="sourceElement">The element that is to be related to this model element.</param>
|
---|
211 | /// <param name="elementGroup">The group of source ModelElements that have been rehydrated into the target store.</param>
|
---|
212 | /// <remarks>
|
---|
213 | /// This method is overriden to create the relationship between the target element and the specified source element.
|
---|
214 | /// The base method does nothing.
|
---|
215 | /// </remarks>
|
---|
216 | protected override void MergeRelate(DslModeling::ModelElement sourceElement, DslModeling::ElementGroup elementGroup)
|
---|
217 | {
|
---|
218 | // In general, sourceElement is allowed to be null, meaning that the elementGroup must be parsed for special cases.
|
---|
219 | // However this is not supported in generated code. Use double-deriving on this class and then override MergeRelate completely if you
|
---|
220 | // need to support this case.
|
---|
221 | if ( sourceElement == null ) throw new global::System.ArgumentNullException("sourceElement");
|
---|
222 |
|
---|
223 |
|
---|
224 | global::HeuristicLab.SimulationCore.Activity sourceActivity1 = sourceElement as global::HeuristicLab.SimulationCore.Activity;
|
---|
225 | if (sourceActivity1 != null)
|
---|
226 | {
|
---|
227 | // Create link for path SimulationModelHasActivities.Activities
|
---|
228 | this.Activities.Add(sourceActivity1);
|
---|
229 |
|
---|
230 | return;
|
---|
231 | }
|
---|
232 |
|
---|
233 | global::HeuristicLab.SimulationCore.Action sourceAction2 = sourceElement as global::HeuristicLab.SimulationCore.Action;
|
---|
234 | if (sourceAction2 != null)
|
---|
235 | {
|
---|
236 | // Create link for path SimulationModelHasActions.Actions
|
---|
237 | this.Actions.Add(sourceAction2);
|
---|
238 |
|
---|
239 | return;
|
---|
240 | }
|
---|
241 |
|
---|
242 | // Sdk workaround to runtime bug #879350 (DSL: can't copy and paste a MEL that has a MEX). Avoid MergeRelate on ModelElementExtension
|
---|
243 | // during a "Paste".
|
---|
244 | if (sourceElement is DslModeling::ExtensionElement
|
---|
245 | && sourceElement.Store.TransactionManager.CurrentTransaction.TopLevelTransaction.Context.ContextInfo.ContainsKey("{9DAFD42A-DC0E-4d78-8C3F-8266B2CF8B33}"))
|
---|
246 | {
|
---|
247 | return;
|
---|
248 | }
|
---|
249 |
|
---|
250 | // Fall through to base class if this class hasn't handled the merge.
|
---|
251 | base.MergeRelate(sourceElement, elementGroup);
|
---|
252 | }
|
---|
253 |
|
---|
254 | /// <summary>
|
---|
255 | /// Performs operation opposite to MergeRelate - i.e. disconnects a given
|
---|
256 | /// element from the current one (removes links created by MergeRelate).
|
---|
257 | /// </summary>
|
---|
258 | /// <param name="sourceElement">Element to be unmerged/disconnected.</param>
|
---|
259 | [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
---|
260 | protected override void MergeDisconnect(DslModeling::ModelElement sourceElement)
|
---|
261 | {
|
---|
262 | if (sourceElement == null) throw new global::System.ArgumentNullException("sourceElement");
|
---|
263 |
|
---|
264 | global::HeuristicLab.SimulationCore.Activity sourceActivity1 = sourceElement as global::HeuristicLab.SimulationCore.Activity;
|
---|
265 | if (sourceActivity1 != null)
|
---|
266 | {
|
---|
267 | // Delete link for path SimulationModelHasActivities.Activities
|
---|
268 |
|
---|
269 | foreach (DslModeling::ElementLink link in global::HeuristicLab.SimulationCore.SimulationModelHasActivities.GetLinks((global::HeuristicLab.SimulationCore.SimulationModel)this, sourceActivity1))
|
---|
270 | {
|
---|
271 | // Delete the link, but without possible delete propagation to the element since it's moving to a new location.
|
---|
272 | link.Delete(global::HeuristicLab.SimulationCore.SimulationModelHasActivities.SimulationModelDomainRoleId, global::HeuristicLab.SimulationCore.SimulationModelHasActivities.ActivityDomainRoleId);
|
---|
273 | }
|
---|
274 |
|
---|
275 | return;
|
---|
276 | }
|
---|
277 |
|
---|
278 | global::HeuristicLab.SimulationCore.Action sourceAction2 = sourceElement as global::HeuristicLab.SimulationCore.Action;
|
---|
279 | if (sourceAction2 != null)
|
---|
280 | {
|
---|
281 | // Delete link for path SimulationModelHasActions.Actions
|
---|
282 |
|
---|
283 | foreach (DslModeling::ElementLink link in global::HeuristicLab.SimulationCore.SimulationModelHasActions.GetLinks((global::HeuristicLab.SimulationCore.SimulationModel)this, sourceAction2))
|
---|
284 | {
|
---|
285 | // Delete the link, but without possible delete propagation to the element since it's moving to a new location.
|
---|
286 | link.Delete(global::HeuristicLab.SimulationCore.SimulationModelHasActions.SimulationModelDomainRoleId, global::HeuristicLab.SimulationCore.SimulationModelHasActions.ActionDomainRoleId);
|
---|
287 | }
|
---|
288 |
|
---|
289 | return;
|
---|
290 | }
|
---|
291 | // Fall through to base class if this class hasn't handled the unmerge.
|
---|
292 | base.MergeDisconnect(sourceElement);
|
---|
293 | }
|
---|
294 | #endregion
|
---|
295 | }
|
---|
296 | }
|
---|
297 | namespace HeuristicLab.SimulationCore
|
---|
298 | {
|
---|
299 | /// <summary>
|
---|
300 | /// DomainClass Activity
|
---|
301 | /// Description for HeuristicLab.SimulationCore.Activity
|
---|
302 | /// </summary>
|
---|
303 | [DslDesign::DisplayNameResource("HeuristicLab.SimulationCore.Activity.DisplayName", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
304 | [DslDesign::DescriptionResource("HeuristicLab.SimulationCore.Activity.Description", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
305 | [DslModeling::DomainModelOwner(typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel))]
|
---|
306 | [global::System.CLSCompliant(true)]
|
---|
307 | [global::System.Diagnostics.DebuggerDisplay("{GetType().Name,nq} (Name = {namePropertyStorage})")]
|
---|
308 | [DslModeling::DomainObjectId("168d4729-6156-4a96-87c5-6f8e7dbe5a0f")]
|
---|
309 | public partial class Activity : DslModeling::ModelElement
|
---|
310 | {
|
---|
311 | #region Constructors, domain class Id
|
---|
312 |
|
---|
313 | /// <summary>
|
---|
314 | /// Activity domain class Id.
|
---|
315 | /// </summary>
|
---|
316 | public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x168d4729, 0x6156, 0x4a96, 0x87, 0xc5, 0x6f, 0x8e, 0x7d, 0xbe, 0x5a, 0x0f);
|
---|
317 | /// <summary>
|
---|
318 | /// Constructor
|
---|
319 | /// </summary>
|
---|
320 | /// <param name="store">Store where new element is to be created.</param>
|
---|
321 | /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
|
---|
322 | public Activity(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
|
---|
323 | : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
|
---|
324 | {
|
---|
325 | }
|
---|
326 |
|
---|
327 | /// <summary>
|
---|
328 | /// Constructor
|
---|
329 | /// </summary>
|
---|
330 | /// <param name="partition">Partition where new element is to be created.</param>
|
---|
331 | /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
|
---|
332 | public Activity(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
|
---|
333 | : base(partition, propertyAssignments)
|
---|
334 | {
|
---|
335 | }
|
---|
336 | #endregion
|
---|
337 | #region Name domain property code
|
---|
338 |
|
---|
339 | /// <summary>
|
---|
340 | /// Name domain property Id.
|
---|
341 | /// </summary>
|
---|
342 | public static readonly global::System.Guid NameDomainPropertyId = new global::System.Guid(0x5d66e342, 0xeb3f, 0x43c5, 0xa1, 0x2d, 0xe7, 0x52, 0x68, 0x9e, 0x36, 0x0f);
|
---|
343 |
|
---|
344 | /// <summary>
|
---|
345 | /// Storage for Name
|
---|
346 | /// </summary>
|
---|
347 | private global::System.String namePropertyStorage = string.Empty;
|
---|
348 |
|
---|
349 | /// <summary>
|
---|
350 | /// Gets or sets the value of Name domain property.
|
---|
351 | /// Description for HeuristicLab.SimulationCore.Activity.Name
|
---|
352 | /// </summary>
|
---|
353 | [DslDesign::DisplayNameResource("HeuristicLab.SimulationCore.Activity/Name.DisplayName", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
354 | [DslDesign::DescriptionResource("HeuristicLab.SimulationCore.Activity/Name.Description", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
355 | [DslModeling::ElementName]
|
---|
356 | [DslModeling::DomainObjectId("5d66e342-eb3f-43c5-a12d-e752689e360f")]
|
---|
357 | public global::System.String Name
|
---|
358 | {
|
---|
359 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
360 | get
|
---|
361 | {
|
---|
362 | return namePropertyStorage;
|
---|
363 | }
|
---|
364 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
365 | set
|
---|
366 | {
|
---|
367 | NamePropertyHandler.Instance.SetValue(this, value);
|
---|
368 | }
|
---|
369 | }
|
---|
370 | /// <summary>
|
---|
371 | /// Value handler for the Activity.Name domain property.
|
---|
372 | /// </summary>
|
---|
373 | internal sealed partial class NamePropertyHandler : DslModeling::DomainPropertyValueHandler<Activity, global::System.String>
|
---|
374 | {
|
---|
375 | private NamePropertyHandler() { }
|
---|
376 |
|
---|
377 | /// <summary>
|
---|
378 | /// Gets the singleton instance of the Activity.Name domain property value handler.
|
---|
379 | /// </summary>
|
---|
380 | public static readonly NamePropertyHandler Instance = new NamePropertyHandler();
|
---|
381 |
|
---|
382 | /// <summary>
|
---|
383 | /// Gets the Id of the Activity.Name domain property.
|
---|
384 | /// </summary>
|
---|
385 | public sealed override global::System.Guid DomainPropertyId
|
---|
386 | {
|
---|
387 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
388 | get
|
---|
389 | {
|
---|
390 | return NameDomainPropertyId;
|
---|
391 | }
|
---|
392 | }
|
---|
393 |
|
---|
394 | /// <summary>
|
---|
395 | /// Gets a strongly-typed value of the property on specified element.
|
---|
396 | /// </summary>
|
---|
397 | /// <param name="element">Element which owns the property.</param>
|
---|
398 | /// <returns>Property value.</returns>
|
---|
399 | public override sealed global::System.String GetValue(Activity element)
|
---|
400 | {
|
---|
401 | if (element == null) throw new global::System.ArgumentNullException("element");
|
---|
402 | return element.namePropertyStorage;
|
---|
403 | }
|
---|
404 |
|
---|
405 | /// <summary>
|
---|
406 | /// Sets property value on an element.
|
---|
407 | /// </summary>
|
---|
408 | /// <param name="element">Element which owns the property.</param>
|
---|
409 | /// <param name="newValue">New property value.</param>
|
---|
410 | public override sealed void SetValue(Activity element, global::System.String newValue)
|
---|
411 | {
|
---|
412 | if (element == null) throw new global::System.ArgumentNullException("element");
|
---|
413 |
|
---|
414 | global::System.String oldValue = GetValue(element);
|
---|
415 | if (newValue != oldValue)
|
---|
416 | {
|
---|
417 | ValueChanging(element, oldValue, newValue);
|
---|
418 | element.namePropertyStorage = newValue;
|
---|
419 | ValueChanged(element, oldValue, newValue);
|
---|
420 | }
|
---|
421 | }
|
---|
422 | }
|
---|
423 |
|
---|
424 | #endregion
|
---|
425 | #region SimulationModel opposite domain role accessor
|
---|
426 | /// <summary>
|
---|
427 | /// Gets or sets SimulationModel.
|
---|
428 | /// Description for
|
---|
429 | /// HeuristicLab.SimulationCore.SimulationModelHasActivities.Activity
|
---|
430 | /// </summary>
|
---|
431 | public virtual SimulationModel SimulationModel
|
---|
432 | {
|
---|
433 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
434 | get
|
---|
435 | {
|
---|
436 | return DslModeling::DomainRoleInfo.GetLinkedElement(this, global::HeuristicLab.SimulationCore.SimulationModelHasActivities.ActivityDomainRoleId) as SimulationModel;
|
---|
437 | }
|
---|
438 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
439 | set
|
---|
440 | {
|
---|
441 | DslModeling::DomainRoleInfo.SetLinkedElement(this, global::HeuristicLab.SimulationCore.SimulationModelHasActivities.ActivityDomainRoleId, value);
|
---|
442 | }
|
---|
443 | }
|
---|
444 | #endregion
|
---|
445 | #region Triggers opposite domain role accessor
|
---|
446 |
|
---|
447 | /// <summary>
|
---|
448 | /// Gets a list of Triggers.
|
---|
449 | /// Description for HeuristicLab.SimulationCore.ActivityReferencesTriggers.Activity
|
---|
450 | /// </summary>
|
---|
451 | public virtual DslModeling::LinkedElementCollection<Action> Triggers
|
---|
452 | {
|
---|
453 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
454 | get
|
---|
455 | {
|
---|
456 | return GetRoleCollection<DslModeling::LinkedElementCollection<Action>, Action>(global::HeuristicLab.SimulationCore.ActivityReferencesTriggers.ActivityDomainRoleId);
|
---|
457 | }
|
---|
458 | }
|
---|
459 | #endregion
|
---|
460 | #region Actions opposite domain role accessor
|
---|
461 |
|
---|
462 | /// <summary>
|
---|
463 | /// Gets a list of Actions.
|
---|
464 | /// Description for HeuristicLab.SimulationCore.ActionReferencesListeners.Activity
|
---|
465 | /// </summary>
|
---|
466 | public virtual DslModeling::LinkedElementCollection<Action> Actions
|
---|
467 | {
|
---|
468 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
469 | get
|
---|
470 | {
|
---|
471 | return GetRoleCollection<DslModeling::LinkedElementCollection<Action>, Action>(global::HeuristicLab.SimulationCore.ActionReferencesListeners.ActivityDomainRoleId);
|
---|
472 | }
|
---|
473 | }
|
---|
474 | #endregion
|
---|
475 | }
|
---|
476 | }
|
---|
477 | namespace HeuristicLab.SimulationCore
|
---|
478 | {
|
---|
479 | /// <summary>
|
---|
480 | /// DomainClass Action
|
---|
481 | /// Description for HeuristicLab.SimulationCore.Action
|
---|
482 | /// </summary>
|
---|
483 | [DslDesign::DisplayNameResource("HeuristicLab.SimulationCore.Action.DisplayName", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
484 | [DslDesign::DescriptionResource("HeuristicLab.SimulationCore.Action.Description", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
485 | [DslModeling::DomainModelOwner(typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel))]
|
---|
486 | [global::System.CLSCompliant(true)]
|
---|
487 | [global::System.Diagnostics.DebuggerDisplay("{GetType().Name,nq} (Name = {namePropertyStorage})")]
|
---|
488 | [DslModeling::DomainObjectId("d7ac7ca2-929b-4f0c-b690-e05a92bf28ed")]
|
---|
489 | public partial class Action : DslModeling::ModelElement
|
---|
490 | {
|
---|
491 | #region Constructors, domain class Id
|
---|
492 |
|
---|
493 | /// <summary>
|
---|
494 | /// Action domain class Id.
|
---|
495 | /// </summary>
|
---|
496 | public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xd7ac7ca2, 0x929b, 0x4f0c, 0xb6, 0x90, 0xe0, 0x5a, 0x92, 0xbf, 0x28, 0xed);
|
---|
497 | /// <summary>
|
---|
498 | /// Constructor
|
---|
499 | /// </summary>
|
---|
500 | /// <param name="store">Store where new element is to be created.</param>
|
---|
501 | /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
|
---|
502 | public Action(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
|
---|
503 | : this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
|
---|
504 | {
|
---|
505 | }
|
---|
506 |
|
---|
507 | /// <summary>
|
---|
508 | /// Constructor
|
---|
509 | /// </summary>
|
---|
510 | /// <param name="partition">Partition where new element is to be created.</param>
|
---|
511 | /// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
|
---|
512 | public Action(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
|
---|
513 | : base(partition, propertyAssignments)
|
---|
514 | {
|
---|
515 | }
|
---|
516 | #endregion
|
---|
517 | #region Name domain property code
|
---|
518 |
|
---|
519 | /// <summary>
|
---|
520 | /// Name domain property Id.
|
---|
521 | /// </summary>
|
---|
522 | public static readonly global::System.Guid NameDomainPropertyId = new global::System.Guid(0x3b4b0b0d, 0xcb17, 0x48f2, 0xb0, 0xe1, 0x45, 0xc2, 0x3f, 0xd2, 0xc3, 0x79);
|
---|
523 |
|
---|
524 | /// <summary>
|
---|
525 | /// Storage for Name
|
---|
526 | /// </summary>
|
---|
527 | private global::System.String namePropertyStorage = string.Empty;
|
---|
528 |
|
---|
529 | /// <summary>
|
---|
530 | /// Gets or sets the value of Name domain property.
|
---|
531 | /// Description for HeuristicLab.SimulationCore.Action.Name
|
---|
532 | /// </summary>
|
---|
533 | [DslDesign::DisplayNameResource("HeuristicLab.SimulationCore.Action/Name.DisplayName", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
534 | [DslDesign::DescriptionResource("HeuristicLab.SimulationCore.Action/Name.Description", typeof(global::HeuristicLab.SimulationCore.HLSimDomainModel), "HeuristicLab.SimulationCore.GeneratedCode.DomainModelResx")]
|
---|
535 | [DslModeling::ElementName]
|
---|
536 | [DslModeling::DomainObjectId("3b4b0b0d-cb17-48f2-b0e1-45c23fd2c379")]
|
---|
537 | public global::System.String Name
|
---|
538 | {
|
---|
539 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
540 | get
|
---|
541 | {
|
---|
542 | return namePropertyStorage;
|
---|
543 | }
|
---|
544 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
545 | set
|
---|
546 | {
|
---|
547 | NamePropertyHandler.Instance.SetValue(this, value);
|
---|
548 | }
|
---|
549 | }
|
---|
550 | /// <summary>
|
---|
551 | /// Value handler for the Action.Name domain property.
|
---|
552 | /// </summary>
|
---|
553 | internal sealed partial class NamePropertyHandler : DslModeling::DomainPropertyValueHandler<Action, global::System.String>
|
---|
554 | {
|
---|
555 | private NamePropertyHandler() { }
|
---|
556 |
|
---|
557 | /// <summary>
|
---|
558 | /// Gets the singleton instance of the Action.Name domain property value handler.
|
---|
559 | /// </summary>
|
---|
560 | public static readonly NamePropertyHandler Instance = new NamePropertyHandler();
|
---|
561 |
|
---|
562 | /// <summary>
|
---|
563 | /// Gets the Id of the Action.Name domain property.
|
---|
564 | /// </summary>
|
---|
565 | public sealed override global::System.Guid DomainPropertyId
|
---|
566 | {
|
---|
567 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
568 | get
|
---|
569 | {
|
---|
570 | return NameDomainPropertyId;
|
---|
571 | }
|
---|
572 | }
|
---|
573 |
|
---|
574 | /// <summary>
|
---|
575 | /// Gets a strongly-typed value of the property on specified element.
|
---|
576 | /// </summary>
|
---|
577 | /// <param name="element">Element which owns the property.</param>
|
---|
578 | /// <returns>Property value.</returns>
|
---|
579 | public override sealed global::System.String GetValue(Action element)
|
---|
580 | {
|
---|
581 | if (element == null) throw new global::System.ArgumentNullException("element");
|
---|
582 | return element.namePropertyStorage;
|
---|
583 | }
|
---|
584 |
|
---|
585 | /// <summary>
|
---|
586 | /// Sets property value on an element.
|
---|
587 | /// </summary>
|
---|
588 | /// <param name="element">Element which owns the property.</param>
|
---|
589 | /// <param name="newValue">New property value.</param>
|
---|
590 | public override sealed void SetValue(Action element, global::System.String newValue)
|
---|
591 | {
|
---|
592 | if (element == null) throw new global::System.ArgumentNullException("element");
|
---|
593 |
|
---|
594 | global::System.String oldValue = GetValue(element);
|
---|
595 | if (newValue != oldValue)
|
---|
596 | {
|
---|
597 | ValueChanging(element, oldValue, newValue);
|
---|
598 | element.namePropertyStorage = newValue;
|
---|
599 | ValueChanged(element, oldValue, newValue);
|
---|
600 | }
|
---|
601 | }
|
---|
602 | }
|
---|
603 |
|
---|
604 | #endregion
|
---|
605 | #region SimulationModel opposite domain role accessor
|
---|
606 | /// <summary>
|
---|
607 | /// Gets or sets SimulationModel.
|
---|
608 | /// Description for HeuristicLab.SimulationCore.SimulationModelHasActions.Action
|
---|
609 | /// </summary>
|
---|
610 | public virtual SimulationModel SimulationModel
|
---|
611 | {
|
---|
612 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
613 | get
|
---|
614 | {
|
---|
615 | return DslModeling::DomainRoleInfo.GetLinkedElement(this, global::HeuristicLab.SimulationCore.SimulationModelHasActions.ActionDomainRoleId) as SimulationModel;
|
---|
616 | }
|
---|
617 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
618 | set
|
---|
619 | {
|
---|
620 | DslModeling::DomainRoleInfo.SetLinkedElement(this, global::HeuristicLab.SimulationCore.SimulationModelHasActions.ActionDomainRoleId, value);
|
---|
621 | }
|
---|
622 | }
|
---|
623 | #endregion
|
---|
624 | #region Activities opposite domain role accessor
|
---|
625 |
|
---|
626 | /// <summary>
|
---|
627 | /// Gets a list of Activities.
|
---|
628 | /// Description for HeuristicLab.SimulationCore.ActivityReferencesTriggers.Action
|
---|
629 | /// </summary>
|
---|
630 | public virtual DslModeling::LinkedElementCollection<Activity> Activities
|
---|
631 | {
|
---|
632 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
633 | get
|
---|
634 | {
|
---|
635 | return GetRoleCollection<DslModeling::LinkedElementCollection<Activity>, Activity>(global::HeuristicLab.SimulationCore.ActivityReferencesTriggers.ActionDomainRoleId);
|
---|
636 | }
|
---|
637 | }
|
---|
638 | #endregion
|
---|
639 | #region Listeners opposite domain role accessor
|
---|
640 |
|
---|
641 | /// <summary>
|
---|
642 | /// Gets a list of Listeners.
|
---|
643 | /// Description for HeuristicLab.SimulationCore.ActionReferencesListeners.Action
|
---|
644 | /// </summary>
|
---|
645 | public virtual DslModeling::LinkedElementCollection<Activity> Listeners
|
---|
646 | {
|
---|
647 | [global::System.Diagnostics.DebuggerStepThrough]
|
---|
648 | get
|
---|
649 | {
|
---|
650 | return GetRoleCollection<DslModeling::LinkedElementCollection<Activity>, Activity>(global::HeuristicLab.SimulationCore.ActionReferencesListeners.ActionDomainRoleId);
|
---|
651 | }
|
---|
652 | }
|
---|
653 | #endregion
|
---|
654 | }
|
---|
655 | }
|
---|