public FactALInterface(BTInterface ifa, ALModel alModel) { this.joinIdx = 0; this.BTInterface = ifa; this.Model = alModel; this.HistoryAttribute = null; this.FactInterfaceReferences = new List <FactInterfaceReference>(); PrepareAttributes(); }
private string CalculateAlias(ALModel model, BT.RefBTAttribute refAttr) { if (string.IsNullOrEmpty(refAttr?.refBLAttribute?.Core?.Alias)) { return(""); } else { return($"{refAttr.refBLAttribute.Core.Alias}_"); } }
public DimensionALInterface(ALModel model, RefBTAttribute refAttr) { this.Model = model; this.BTInterface = refAttr.ReferencedBTInterface; this.Core = refAttr.ReferencedBTInterface.coreInterface; this.Depth = 1; this.RootDimension = this; this.Alias = CalculateAlias(model, refAttr); this.ShortName = CalculateShortName(model, refAttr); this.Name = CalculateName(model, refAttr); PrepareAttributes(); }
private string CalculateName(ALModel model, BT.RefBTAttribute refAttr) { string name = ""; if (string.IsNullOrEmpty(model.Config.Prefix)) { name = $"D_"; } else { name = $"{model.Config.Prefix}_D_"; } name += $"{RootDimension.ShortName}_{Depth}_{this.ShortName}"; return(name); }
internal DimensionALInterface(ALModel model, BT.RefBTAttribute refAttr, DimensionALInterface rootDimension, int depth) { if (rootDimension == null) { rootDimension = this; } this.Model = model; this.BTInterface = refAttr.ReferencedBTInterface; this.Core = refAttr.ReferencedBTInterface.coreInterface; this.Depth = depth; this.RootDimension = rootDimension; this.Alias = CalculateAlias(model, refAttr); this.ShortName = CalculateShortName(model, refAttr); this.Name = CalculateName(model, refAttr); PrepareAttributes(); }
private string CalculateShortName(ALModel model, BT.RefBTAttribute refAttr) { if (string.IsNullOrEmpty(refAttr?.refBLAttribute?.Core?.Alias) && refAttr.ReferencedBTInterface.IsHistoryTable) { return($"{refAttr.ReferencedBTInterface.ShortName}_VERSION"); } else if (string.IsNullOrEmpty(refAttr?.refBLAttribute?.Core?.Alias)) { return(refAttr.ReferencedBTInterface.ShortName); } else if (refAttr.ReferencedBTInterface.IsHistoryTable) { return($"{refAttr.refBLAttribute.Core.Alias}_{refAttr.ReferencedBTInterface.ShortName}_VERSION"); } else { return($"{refAttr.refBLAttribute.Core.Alias}_{refAttr.ReferencedBTInterface.ShortName}"); } }