public bool TryGetSubject(int targetIndex, out GraphSubject graphSubject)
        {
            if (Subjects == null)
            {
                graphSubject = default(GraphSubject);
                return(false);
            }

            return(Subjects.TryGetValue(targetIndex, out graphSubject));
        }
        public void AddSubjectAndClaim(GraphIssuer subject, int claimIndex)
        {
            if (Subjects == null)
            {
                Subjects = new Dictionary <int, GraphSubject>();
            }

            if (!Subjects.ContainsKey(subject.Index))
            {
                var graphSubject = new GraphSubject
                {
                    TargetIssuer = subject
                };
                graphSubject.AddClaim(claimIndex);
                Subjects.Add(subject.Index, graphSubject);
            }
            else
            {
                Subjects[subject.Index].AddClaim(claimIndex);
            }
        }
        public GraphSubject AddGraphSubject(GraphIssuer subject)
        {
            if (Subjects == null)
            {
                Subjects = new Dictionary <int, GraphSubject>();
            }

            if (!Subjects.ContainsKey(subject.Index))
            {
                var graphSubject = new GraphSubject
                {
                    TargetIssuer = subject
                };
                Subjects.Add(subject.Index, graphSubject);
                return(graphSubject);
            }
            else
            {
                return(Subjects[subject.Index]);
            }
        }