I have an object graph in Objective-C on the iPhone platform that I wish to persist to flash when closing the app. The graph has about 100k-200k objects and contains many loops (by design). I need to be able to read/write this graph as quickly as possible.
So far I have tried using NSCoder. This not only struggles with the loops but als...
I have a databound grid at my view (XAML) and the Itemsource points to a ReportsCollection. The Reports entity has three primitives and some complex types. These three are shown as expected at datagrid. Additionally the Reports entity has a property of type Store. When loading Reports via GetReports domain method, I quickly figure out th...
I'm really new to web services and need to create a webservice that can deal with object graphs. My canonical example would be a CRM web service that given a customer number would return an "object" of type Company with a collection property of Contacts.
ie:
[WebService]
public Company GetCompanyByCustomerNumber( string customerNumber ...
In the system which I'm currently developing I often have to navigate an object tree and based on its state and values take actions. In normal Java this results in tedious for loops, if statements etc... Are there alternative ways to achieve tree navigation, similar to XPath for XML? I know there is JXPath and OGNL, but do you know any o...
While using for an object this code to serialize it:
public object Clone()
{
var serializer = new DataContractSerializer(GetType());
using (var ms = new System.IO.MemoryStream())
{
serializer.WriteObject(ms, this);
ms.Position = 0;
return serializer.ReadObject(ms);
...
I'm having difficulty conditionally creating a dependency. Googling, I have yet to find a good example of using the BuildStack and Conditional Predicates.
Here's what I'm doing in the Registry:
//snip
public SomeRegistry()
{
this.InstanceOf<IFoo>().Is.Conditional(
c =>
{
c.TheDefault.Is.Constru...
I'm reading a book about DI that always talks about DI frameworks "instantiating an object graph". Why say it this way rather than "instantiating objects"?
...
I have two NHibernate-managed entities that have a bi-directional one-to-many relationship:
public class Storage
{
public virtual string Name { get; set; }
public virtual IList<Box> Boxes { get; set; }
}
public class Box
{
public virtual string Box { get; set; }
[DoNotSerialize] public virtual Storage ParentStorage { ge...
The repository pattern typically has Get*() and Save() (or equivalent) methods for each object. How does this fit into the object graph in EF? Consider the following with lazy-loading POCO objects:
// EF
var orderItems = context.OrderItems.Where(oi => oi.Order.Id == 123);
// Repository
IOrderItemsRepository orderItemsRepository = new...
For various reasons I have a custom serialization where I am dumping some fairly simple objects to a data file. There are maybe 5-10 classes, and the object graphs that result are acyclic and pretty simple (each serialized object has 1 or 2 references to another that are serialized). For example:
class Foo
{
final private long id;
...
Do you know a good java object graph visitor library?
I want to visit an object and its sub components and perform some actions when some conditions are matched.
Example usage:
on a huge domain object graph, reset
each id to null
on a huge domain object graph, replace each Set with a TreeSet
instance containing the same
elements.
...
Does anyone know of, or can recommend, a library that can recursively visualize an arbitrary object graph in .NET?
I need to be able to print out (to the console) a formatted representation of an object graph. For example, given a simple object graph like this:
var foo = new Foo();
foo.Bar = new Bar();
foo.Bar.Baz = 42;
foo.Bar.Qux = "...