예제 #1
0
파일: Parser.cs 프로젝트: ShaneGH/SqlDsl
 /// <summary>
 /// Map a group of rows to an object property graph to an object graph with properties
 /// </summary>
 /// <param name="objects">An enumerable of objects. Each object can span multiple rows (corresponding to sub properties which are enumerable)</param>
 static IEnumerable <ObjectGraph> CreateObject(ObjectPropertyGraph propertyGraph, ObjectGraphCache objectGraphCache, IEnumerable <IEnumerable <object[]> > objects, ILogger logger)
 {
     foreach (var objectData in objects)
     {
         var graph = objectGraphCache.ReleseOrCreateItem();
         graph.Init(propertyGraph, objectData);
         yield return(graph);
     }
 }
예제 #2
0
 public ComplexConstructorArg(int argIndex, Type constuctorArgType, ObjectPropertyGraph value)
 {
     this.ArgIndex          = argIndex;
     this.ConstuctorArgType = constuctorArgType;
     this.Value             = value;
 }
예제 #3
0
파일: Parser.cs 프로젝트: ShaneGH/SqlDsl
        /// <summary>
        /// Map a group of rows to an object property graph to an object graph with properties
        /// </summary>
        /// <param name="objects">A raw block of data, which has not been grouped into objects</param>
        static IEnumerable <ObjectGraph> CreateObject(ObjectPropertyGraph propertyGraph, ObjectGraphCache objectGraphCache, IEnumerable <object[]> rows, ILogger logger)
        {
            var objectsData = propertyGraph.GroupAndFilterData(rows);

            return(CreateObject(propertyGraph, objectGraphCache, objectsData, logger));
        }