상속: IGetSubGraph
예제 #1
0
        public static IGetObjectGraph BuildGetObjectGraph(TypeExclusions typeExclusions, ITypeFieldExclusion typeFieldExclusion)
        {
            LazyGetObjectGraph getObjectGraph = new LazyGetObjectGraph();

            IGetSubGraph getSubGraph = new CompositeGetSubGraph(new List <IGetSubGraph>()
            {
                new EnumerableGetSubGraph(getObjectGraph, typeExclusions),
                new DefaultGetSubGraph(getObjectGraph,
                                       new DefaultGetObjectFields(
                                           new FilteringGetTypeFields(
                                               new DefaultGetTypeFields(),
                                               typeFieldExclusion)),
                                       typeExclusions)
            });

            getObjectGraph.GetObjectGraph = new DefaultGetObjectGraph(getSubGraph, typeExclusions);

            return(getObjectGraph);
        }
예제 #2
0
        public static IGetObjectGraph BuildGetObjectGraph(TypeExclusions typeExclusions, ITypeFieldExclusion typeFieldExclusion)
        {
            LazyGetObjectGraph getObjectGraph = new LazyGetObjectGraph();

            IGetSubGraph getSubGraph = new CompositeGetSubGraph(new List<IGetSubGraph>()
                                                                {
                                                                    new EnumerableGetSubGraph(getObjectGraph, typeExclusions),
                                                                    new DefaultGetSubGraph(getObjectGraph,
                                                                                           new DefaultGetObjectFields(
                                                                                               new FilteringGetTypeFields(
                                                                                                   new DefaultGetTypeFields(),
                                                                                                   typeFieldExclusion)),
                                                                                           typeExclusions)
                                                                });

            getObjectGraph.GetObjectGraph = new DefaultGetObjectGraph(getSubGraph, typeExclusions);

            return getObjectGraph;
        }