Exemplo n.º 1
0
        public static void SetEvidence(this ILineData lineData, string sectionId, int year, string vertexKey, VertexEvidence vertexEvidence)
        {
            var sectionEvidence = lineData.GetEvidence(sectionId);

            if (vertexEvidence.Type == VertexEvidenceType.Null)
            {
                sectionEvidence[year][vertexKey] = null;
            }
            else
            {
                sectionEvidence[year][vertexKey] = vertexEvidence;
            }

            lineData.SetEvidence(sectionId, sectionEvidence);
        }
Exemplo n.º 2
0
        public static Dict <object, VertexEvidence> GetEvidence(this ILineData lineData, string sectionId, IEnumerable <int> years, string nodeKey)
        {
            var nodeEvidences   = new Dict <object, VertexEvidence>();
            var sectionEvidence = lineData.GetEvidence(sectionId);

            if (years == null)
            {
                years = sectionEvidence.Keys;
            }

            foreach (var year in years)
            {
                nodeEvidences[year] = sectionEvidence[year][nodeKey];
            }

            return(nodeEvidences);
        }
Exemplo n.º 3
0
        public static Dict <object, VertexEvidence> GetEvidence(this ILineData lineData, IEnumerable <string> sectionIds, int year, string nodeKey)
        {
            var nodeEvidences = new Dict <object, VertexEvidence>();

            if (sectionIds == null)
            {
                sectionIds = lineData.SectionIds;
            }

            foreach (var sectionId in sectionIds)
            {
                var sectionEvidence = lineData.GetEvidence(sectionId);
                nodeEvidences[sectionId] = sectionEvidence[year][nodeKey];
            }

            return(nodeEvidences);
        }
Exemplo n.º 4
0
 public void Line(string element, ILineData data, ILineOptions options)
 {
     RegisteredFunction.Invoke <bool>(JsFunctionHelper.GetFunctionName(this), element, data, options);
 }