system.reactive - Reactive Extensions Subject<IEnumerable<Obj>> to Subject<IEnumerable<AggregatedObj>>

I'm having trouble taking a subject of public Subject<IEnumerable<Person>> PersonDataSubject;And converting it to: public Subject<IEnumerable<BornInYear>> BornInYearSubject;... using some linq aggregation.The example below puts it in more context, and where I'm struggling is working out how to get an IEnumerable into the BornInYearSubject from a subscription to the PersonDataSubject.Whatever I try I end up with an IObservable<BornInYear>, not an IObservable<IEnumerable<BornInYear>>.The goal i...Read more

ienumerable - Choosing the right Collection/List for my repository

I have a repository:public ObservableCollection<ProjectExpenseBO> GetProjectExpenses(){ //Get by query IQueryable<ProjectExpenseBO> projectExpenseQuery = from p in _service.project_expense from e in _service.vw_employee where p.employee_id == e.employee_id select new ProjectExpenseBO() { ProjectExpenseID = p.project_expense_id , EmployeeID = p.employee_id , ProjectNumber = p.project_number , PurchaseTypeID = p.purchase_type_id , BuyerEmployeeID =...Read more

system.reactive - using Reactive Extensions to monitor IEnumerable

I'm connecting to an object that asyncronously loads a collection of objects into an IEnumerable. At the time I connect, the IEnumerable may have items already in it's collection, and may add items during the lifetime of the application that I need to be notified of as they occur. As an example, it could be a bank account containing a list of bank transactions.The challenge is this. I want to combine the processing of the initial values in the IEnumerable with any new additions. They are currently two processes. I would like to eliminate t...Read more

serialization - Serializing data using IEnumerable<T> with WebGet

possible duplicate: Cannot serialize parameter of type ‘System.Linq.Enumerable… ’ when using WCF, LINQ, JSONHi,If my method signiature looks like this, it works fine.[WebGet]MyClass[] WebMethod()If the signiature looks like this[WebGet]IEnumerable<T> WebMethod()I get the following error:Cannot serialize parameter of type 'X.Y.Z.T+<WebMethod>d__2c' (for operation 'WebMethod', contract 'IService') because it is not the exact type 'System.Collections.Generic.IEnumerable`1[X.Y.Z.T]' in the method signature and is not in the known types...Read more

IEnumerable<T> and IEnumerator - some clarification please

Good afternoon,I'm currently reading the Pro MVC 4 book published by Apress, and Im on the section which talks about extension methods.I'm struggling to understand a section of code as follows: public class ShoppingCart : IEnumerable<Product>{ public List<Product> Products { get; set; } public IEnumerator<Product> GetEnumerator() { return Products.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); }}I understand that the ShoppingCart class inherits a ...Read more

Convert IEnumerable<XElement> to XElement

The return type of my query is IEnumerable<XElement>. how can i convert the resultant data to XElement type? is it possible? could some body help me to understand this.var resQ = from e in docElmnt.Descendants(xmlns + Constants.T_ROOT) .Where(x => x.Attribute(Constants.T_ID).Value == "testid") select e;I have to pass resQ as a parameter to the below function. in order to do that I have to convert resQ to XElement type.Database.usp_InsertTestNQuestions(tid, qId, qstn, ans, resQ );...Read more

Automapper Type Converter from String to IEnumerable<String> is not being called

Here is my custom Type Converter.public class StringListTypeConverter : TypeConverter<String, IEnumerable<String>>{ protected override IEnumerable<string> ConvertCore(String source) { if (source == null) yield break; foreach (var item in source.Split(',')) yield return item.Trim(); }}public class Source{ public String Some {get;set;}}public class Dest{ public IEnumerable<String> Some {get;set;}}// ... configurationMapper.CreateMap<String, IEnumerable<String>>...Read more