public bool Append(string filename) { if (!filename.Equals("") && System.IO.File.Exists(filename)) { lock (mExtendTypes.SyncRoot) { if (!mExtendTypes.ContainsKey(filename)) { IExtendTypes extTypes = new CExtendTypes(mSystemContext, filename, true, 500); mExtendTypes.Add(extTypes.FileName, extTypes); return(true); } } } return(false); }
public void InitExtendTypes(string path) { if (!path.Equals("") && Directory.Exists(path)) { string[] files = Directory.GetFiles(path, "*.dll"); if (files != null && files.Length > 0) { IExtendTypes extTypes = null; lock (mExtendTypes.SyncRoot) { foreach (string filename in files) { if (!mExtendTypes.ContainsKey(filename)) { extTypes = new CExtendTypes(mSystemContext, filename, true, 0); mExtendTypes.Add(extTypes.FileName, extTypes); } } } } } }