Inheritance: global::System.ComponentModel.INotifyPropertyChanged
コード例 #1
0
        static CoreRepositoryMock()
        {
            biz.dfch.CS.Appclusive.Api.Core.Core core = new Api.Core.Core(new Uri(Properties.Settings.Default.AppculsiveApiBaseUrl + "Core"));


            // 2. Customers
            customers = new List<Customer>();
            Customer customer = new Customer()
            {
                Name = "Mocked customer",
                Description = "Mocked description",
            };
            customer.Tenants.AddRange(core.Tenants);
            customers.Add(customer);

            // 3. contracts
            contractMappings = new List<ContractMapping>();
            ContractMapping contract = new ContractMapping()
            {
                Name = "Mocked contract",
                Description = "Mocked contract",
                ExternalId = "ext id",
                ExternalType = "Ext Type",
                Parameters = "{}"
            };
            contract.Customer = customers.FirstOrDefault();
            contractMappings.Add(contract);
            customer.ContractMappings.AddRange(contractMappings);


        }
コード例 #2
0
 public void AddToCustomers(Customer entity)
 {
     entity.Id = DateTime.Now.Ticks;
     customers.Add(entity);
 }