public void JSON_SerializeObjectToJSON() { var baseItem = new BaseListItem { Author = "Navid" }; var json = baseItem.ToJSON(); Assert.IsTrue(json.ToString().Contains("Navid")); }
/// <summary> /// Default constructor /// </summary> public EquipListDesignModel() { EquipList = BaseListItem.GetEquipmentListsAsync().Result; Items = new List <EquipListItemViewModel> { new EquipListItemViewModel { EquipID = 0, EquipName = "특화임무장비1", IsSelected = false }, new EquipListItemViewModel { EquipID = 0, EquipName = "특화임무장비2", IsSelected = true }, }; //Items = new List<BaseListItemViewModel> //{ // new BaseListItemViewModel // { // Name = "Unit", // Contents = AnalysisContent.Unit, // IsSelected = true, // }, // new BaseListItemViewModel // { // Name = "Geometry", // Contents = AnalysisContent.Geometry, // IsSelected = false, // }, // new BaseListItemViewModel // { // Name = "Loads", // Contents = AnalysisContent.Loads, // IsSelected = false, // }, // new BaseListItemViewModel // { // Name = "Analysis", // Contents = AnalysisContent.parameter, // IsSelected = false, // }, // new BaseListItemViewModel // { // Name = "Results", // Contents = AnalysisContent.Result, // IsSelected = false, // }, //}; }
/// <summary> /// Default constructor /// </summary> public BaseListDesignModel() { BaseList = BaseListItem.GetCompositeListsAsync().Result; //Items = new List<BaseListItemViewModel> //{ // new BaseListItemViewModel // { // Name = "Unit", // Contents = AnalysisContent.Unit, // IsSelected = true, // }, // new BaseListItemViewModel // { // Name = "Geometry", // Contents = AnalysisContent.Geometry, // IsSelected = false, // }, // new BaseListItemViewModel // { // Name = "Loads", // Contents = AnalysisContent.Loads, // IsSelected = false, // }, // new BaseListItemViewModel // { // Name = "Analysis", // Contents = AnalysisContent.parameter, // IsSelected = false, // }, // new BaseListItemViewModel // { // Name = "Results", // Contents = AnalysisContent.Result, // IsSelected = false, // }, //}; }
/// <summary> /// Configures our application ready for use /// </summary> private async Task ApplicationSetupAsync() { // Setup the Dna Framework Framework.Construct <DefaultFrameworkConstruction>() .AddFileLogger() .AddClientDataStore() .AddAppsViewModels() .AddAppsClientServices() .Build(); // Ensure the client data store await ClientDataStore.EnsureDataStoreAsync(); // Ensure the BaseList data store await BaseListItem.EnsureDataStoreAsync(); // Monitor for server connection status MonitorServerStatus(); // Load new settings TaskManager.RunAndForget(ViewModelSettings.LoadAsync); }