public RootEntity() { this.Contacts = new AdvisableCollection<Contact>(); this.countries = new AdvisableCollection<Country>(); foreach (string country in Populate.GetCountries()) { this.countries.Add(new Country(country)); } Country russia = this.countries.Single(c => c.Name == "Russia"); foreach (string contactName in Populate.GetContacts()) { string[] names = contactName.Split(' '); Contact contact = new Contact(names[0], names[1]); Address address = new Address { AddressLine1 = "23, Ilyinka Street", Town = "Moscow", Zip = "103132", Country = russia }; contact.Addresses.Add(address); contact.PrincipalAddress = address; this.Contacts.Add(contact); } RecordingServices.DefaultRecorder.Clear(); }
public RootEntity() { this.Contacts = new AdvisableCollection <Contact>(); this.countries = new AdvisableCollection <Country>(); foreach (string country in Populate.GetCountries()) { this.countries.Add(new Country(country)); } Country russia = this.countries.Single(c => c.Name == "Russia"); foreach (string contactName in Populate.GetContacts()) { string[] names = contactName.Split(' '); Contact contact = new Contact(names[0], names[1]); Address address = new Address { AddressLine1 = "23, Ilyinka Street", Town = "Moscow", Zip = "103132", Country = russia }; contact.Addresses.Add(address); contact.PrincipalAddress = address; this.Contacts.Add(contact); } RecordingServices.DefaultRecorder.Clear(); }
public static void MySort <TSource, TKey>(this AdvisableCollection <TSource> observableCollection, Func <TSource, TKey> keySelector) { var a = observableCollection.OrderBy(keySelector).ToList(); observableCollection.Clear(); foreach (var b in a) { observableCollection.Add(b); } }
public Person() { Addresses = new AdvisableCollection<Address>(); }
protected ViewModelKeyedCollection([Required] AdvisableCollection <TModel> model) { this.Model = model; model.CollectionChanged += this.OnModelCollectionChanged; }
public Invoice() { Lines = new AdvisableCollection <InvoiceLine>(); }
public Invoice(long id) : base(id) { Items = new AdvisableCollection <Item> { new Item("widget") }; }
public SubDatabase() { Collection = new DataCollection <SubInstance>(); Dictionary = new DataDictionary <string, SubInstance>(); NotRecordableCollection = new AdvisableCollection <string>(); }
public CreatureViewModelCollection([Required] AdvisableCollection <Creature> model, [Required] BoardViewModel board) : base(model) { this.board = board; this.AddFromModel(); }