/// <summary> /// 選択されたアイテムの展開/折りたたみ状態を設定する /// </summary> /// <param name="param"></param> private void SetSelectedExpanded(bool?param) { foreach (var item in Storages.Where(x => x.IsSelected)) { item.IsExpanded = param == true; } }
//internal DocumentTransaction(DocumentEngine engine, bool isInternalTransaction) //{ // Engine = engine; // TypeOf = new ConcurrentDictionary<string, List<DocumentContext>>(); // Storages = new List<DocumentStorage>(); // IsInternalTransaction = isInternalTransaction; //} internal DocumentStorage GetTransactionalStorage(string typeOf, int partition, bool isBeginOperation) { var storage = Storages.Where(s => s.TypeOf == typeOf && s.Partition == partition) .FirstOrDefault(); if (storage == null) { storage = new DocumentStorage(typeOf, Engine.Provider.BaseDirectory, partition); if (isBeginOperation) { storage.BeginOperation(); } Storages.Add(storage); } return(storage); }
/// <summary> /// 得到存储 /// </summary> /// <returns></returns> public virtual IList <SaveInfo> GetSaves() { return(Storages.Where(storage => storage.Value.Information.SaveType != SaveType.None) .Select(storage => storage.Value).ToList()); }