public void AddCrate <T>(ActivityDTO activityDTO, T crateManifest, string label) { var crateStorage = Crate.GetStorage(activityDTO.ExplicitData); var crate = Crate <T> .FromContent(label, crateManifest); crateStorage.Add(crate); activityDTO.ExplicitData = Crate.CrateStorageAsStr(crateStorage); }
protected void AddHubCrate <T>(Fr8DataDTO dataDTO, T crateManifest, string label, string innerLabel) { var crateStorage = Crate.GetStorage(dataDTO.ExplicitData); var fullLabel = label; if (!string.IsNullOrEmpty(innerLabel)) { fullLabel += "_" + innerLabel; } var crate = Crate <T> .FromContent(fullLabel, crateManifest); crateStorage.Add(crate); dataDTO.ExplicitData = Crate.CrateStorageAsStr(crateStorage); }