Пример #1
0
 static ReadDelegateCompiler()
 {
     VertexAttributesReader =
         (ReadVertexAttributesDelegate)CreateReadDelegate(
             typeof(ReadVertexAttributesDelegate),
             typeof(TVertex)
             //,"id"
             );
     EdgeAttributesReader =
         (ReadEdgeAttributesDelegate)CreateReadDelegate(
             typeof(ReadEdgeAttributesDelegate),
             typeof(TEdge)
             //,"id", "source", "target"
             );
     GraphAttributesReader =
         (ReadGraphAttributesDelegate)CreateReadDelegate(
             typeof(ReadGraphAttributesDelegate),
             typeof(TGraph)
             );
     SetVertexDefault =
         (Action <TVertex>)CreateSetDefaultDelegate(
             typeof(Action <TVertex>),
             typeof(TVertex)
             );
     SetEdgeDefault =
         (Action <TEdge>)CreateSetDefaultDelegate(
             typeof(Action <TEdge>),
             typeof(TEdge)
             );
     SetGraphDefault =
         (Action <TGraph>)CreateSetDefaultDelegate(
             typeof(Action <TGraph>),
             typeof(TGraph)
             );
 }
Пример #2
0
 public static void CreateReadDelegates()
 {
     readVertexAttributesDelegate =
         (ReadVertexAttributesDelegate)CreateReadDelegate(
             typeof(ReadVertexAttributesDelegate),
             typeof(TVertex),
             "id"
             );
     readEdgeAttributesDelegate =
         (ReadEdgeAttributesDelegate)CreateReadDelegate(
             typeof(ReadEdgeAttributesDelegate),
             typeof(TEdge),
             "id", "source", "target"
             );
 }