public static SnippetData inst() { if (inst_ == null) { inst_ = new SnippetData(); inst_.Snippets = new ObservableCollection <CodeSnippet>(); string path = System.IO.Path.GetDirectoryName(Assembly.GetAssembly(typeof(SnippetData)).Location); path = System.IO.Path.Combine(path, "snippets"); if (System.IO.Directory.Exists(path)) { foreach (string file in System.IO.Directory.EnumerateFiles(path)) { inst_.Snippets.Add(CodeSnippet.FromFile(file)); } } } return(inst_); }
public static SnippetData inst() { if (inst_ == null) { inst_ = new SnippetData(); inst_.Snippets = new ObservableCollection<CodeSnippet>(); string path = System.IO.Path.GetDirectoryName(Assembly.GetAssembly(typeof(SnippetData)).Location); path = System.IO.Path.Combine(path, "snippets"); if (System.IO.Directory.Exists(path)) { foreach (string file in System.IO.Directory.EnumerateFiles(path)) inst_.Snippets.Add(CodeSnippet.FromFile(file)); } } return inst_; }