Beispiel #1
0
 /// <summary>
 /// Get instances of the given class
 /// </summary>
 /// <param name="instanceClass"></param>
 /// <returns></returns>
 public async Task <List <string> > GetInstances(InstanceLabel instanceClass)
 {
     if (!IsOpen)
     {
         await LoadHdt();
     }
     return(hdt.search("", PropertyType, instanceClass.Uri)
            .Select(x => x.getSubject()).ToList());
 }
Beispiel #2
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            InstanceLabel otherInstanceLabel = obj as InstanceLabel;

            if (otherInstanceLabel != null)
            {
                return(this.Label.CompareTo(otherInstanceLabel.Label));
            }
            else
            {
                throw new ArgumentException("Object is not a InstanceLabel");
            }
        }