Esempio n. 1
0
        private Disposable Lock(string sourceFile)
        {
            if (!_dic.TryGetValue(sourceFile, out BoxWorkflowConfigParser box))
            {
                lock (_lock)
                    if (!_dic.TryGetValue(sourceFile, out box))
                    {
                        _dic.Add(sourceFile, box = new BoxWorkflowConfigParser()
                        {
                            SourceFile = sourceFile
                        });
                    }
            }

            var d = new Disposable(box);

            return(d);
        }
Esempio n. 2
0
 public Disposable(BoxWorkflowConfigParser box)
 {
     this.Box        = box;
     this.sourceFile = box.SourceFile;
     this.Box.Lock();
 }