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) ); }
public static void CreateReadDelegates() { readVertexAttributesDelegate = (ReadVertexAttributesDelegate)CreateReadDelegate( typeof(ReadVertexAttributesDelegate), typeof(TVertex), "id" ); readEdgeAttributesDelegate = (ReadEdgeAttributesDelegate)CreateReadDelegate( typeof(ReadEdgeAttributesDelegate), typeof(TEdge), "id", "source", "target" ); }