Exemple #1
0
        public DbObjectListPropertyNode(SexyDatabase database, DbPropertyMetaData metaData, IRxObject container, DirectoryInfo directory) : base(database, metaData, container)
        {
            Directory = directory;
            ItemNodes = new List <DbObjectNode>();

            List = (IRxList)metaData.Property.GetValue(container, null);
            if (List == null)
            {
                throw new ArgumentException($"{metaData.Property.DeclaringType.FullName}.{metaData.Property.Name} cannot be null");
            }

            for (var i = 0; i < List.Count; i++)
            {
                var item = List[i];
                ItemNodes.Add(new DbObjectNode(database, (IRxObject)item, new DirectoryInfo(Path.Combine(Directory.FullName, i.ToString()))));
            }

            List.Changed.Subscribe(x => OnChanged(x));
        }
Exemple #2
0
 public static RxListView <A> a <A>(
     IRxList <A> list, int startIndex, int windowSize
     ) => new RxListView <A>(list, startIndex, windowSize);
Exemple #3
0
 public static RxListView <A> view <A>(
     this IRxList <A> list, int startIndex, int windowSize
     ) => a(list, startIndex, windowSize);
Exemple #4
0
 public static RxListView <A> a <A>(
     IRxList <A> list, int startIndex, int windowSize
     )
 {
     return(new RxListView <A>(list, startIndex, windowSize));
 }
Exemple #5
0
 public static RxListView <A> view <A>(
     this IRxList <A> list, int startIndex, int windowSize
     )
 {
     return(a(list, startIndex, windowSize));
 }