示例#1
0
        public FilteringGetTypeFields(IGetTypeFields getTypeFields, ITypeFieldExclusion typeFieldExclusion)
        {
            if (getTypeFields == null)
            {
                throw new ArgumentNullException("getTypeFields");
            }
            if (typeFieldExclusion == null)
            {
                throw new ArgumentNullException("typeFieldExclusion");
            }

            this._getTypeFields      = getTypeFields;
            this._typeFieldExclusion = typeFieldExclusion;
        }
示例#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);
        }
示例#3
0
 public DefaultGraphTraversal(TypeExclusions typeExclusions, ITypeFieldExclusion typeFieldExclusion)
     : base(BuildGetObjectGraph(typeExclusions, typeFieldExclusion))
 {
 }
示例#4
0
 public DefaultGraphTraversal(ITypeFieldExclusion typeFieldExclusion)
     : this(DefaultTypeExclusions, typeFieldExclusion)
 {
 }
示例#5
0
        public FilteringGetTypeFields(IGetTypeFields getTypeFields, ITypeFieldExclusion typeFieldExclusion)
        {
            if (getTypeFields == null) throw new ArgumentNullException("getTypeFields");
            if (typeFieldExclusion == null) throw new ArgumentNullException("typeFieldExclusion");

            this._getTypeFields = getTypeFields;
            this._typeFieldExclusion = typeFieldExclusion;
        }
示例#6
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;
        }
示例#7
0
 public DefaultGraphTraversal(TypeExclusions typeExclusions, ITypeFieldExclusion typeFieldExclusion)
     : base(BuildGetObjectGraph(typeExclusions, typeFieldExclusion))
 {
 }
示例#8
0
 public DefaultGraphTraversal(ITypeFieldExclusion typeFieldExclusion)
     : this(DefaultTypeExclusions, typeFieldExclusion)
 {
 }