Ejemplo n.º 1
0
		public AddinDatabase (AddinEngine addinEngine, AddinRegistry registry)
		{
			this.addinEngine = addinEngine;
			this.registry = registry;
			addinDbDir = Path.Combine (registry.AddinCachePath, "addin-db-" + VersionTag);
			fileDatabase = new FileDatabase (AddinDbDir);
		}
		public static AddinScanFolderInfo Read (FileDatabase filedb, string file)
		{
			AddinScanFolderInfo finfo = (AddinScanFolderInfo) filedb.ReadSharedObject (file, typeMap);
			if (finfo != null)
				finfo.fileName = file;
			return finfo;
		}
		public static AddinScanFolderInfo Read (FileDatabase filedb, string basePath, string folderPath)
		{
			string fileName;
			AddinScanFolderInfo finfo = (AddinScanFolderInfo) filedb.ReadSharedObject (basePath, GetFolderId (folderPath), ".data", Util.GetFullPath (folderPath), typeMap, out fileName);
			if (finfo != null)
				finfo.fileName = fileName;
			return finfo;
		}
Ejemplo n.º 4
0
        public static AddinScanFolderInfo Read(FileDatabase filedb, string file)
        {
            AddinScanFolderInfo finfo = (AddinScanFolderInfo)filedb.ReadSharedObject(file, typeMap);

            if (finfo != null)
            {
                finfo.fileName = file;
            }
            return(finfo);
        }
Ejemplo n.º 5
0
        public static AddinScanFolderInfo Read(FileDatabase filedb, string basePath, string folderPath)
        {
            string fileName;
            AddinScanFolderInfo finfo = (AddinScanFolderInfo)filedb.ReadSharedObject(basePath, GetDomain(folderPath), ".data", Path.GetFullPath(folderPath), typeMap, out fileName);

            if (finfo != null)
            {
                finfo.fileName = fileName;
            }
            return(finfo);
        }
		internal void SaveBinary (FileDatabase fdb, string file)
		{
			configFile = file;
			SaveBinary (fdb);
		}
		internal static AddinDescription ReadHostBinary (FileDatabase fdb, string basePath, string addinId, string addinFile)
		{
			string fileName;
			AddinDescription description = (AddinDescription) fdb.ReadSharedObject (basePath, addinId, ".mroot", Util.GetFullPath (addinFile), typeMap, out fileName);
			if (description != null) {
				description.FileName = fileName;
				description.fromBinaryFile = true;
				description.canWrite = !fdb.IgnoreDescriptionData;
			}
			return description;
		}
		internal static AddinDescription ReadBinary (FileDatabase fdb, string configFile)
		{
			AddinDescription description = (AddinDescription) fdb.ReadSharedObject (configFile, typeMap);
			if (description != null) {
				description.FileName = configFile;
				description.fromBinaryFile = true;
				description.canWrite = !fdb.IgnoreDescriptionData;
			}
			return description;
		}
Ejemplo n.º 9
0
 public void Write(FileDatabase filedb, string basePath)
 {
     filedb.WriteSharedObject(basePath, GetDomain(folder), ".data", Path.GetFullPath(folder), fileName, typeMap, this);
 }
Ejemplo n.º 10
0
 public void Write(FileDatabase fileDatabase, string file)
 {
     fileDatabase.WriteObject(file, this, typeMap);
 }
		public void Write (FileDatabase filedb, string basePath)
		{
			filedb.WriteSharedObject (basePath, GetFolderId (folder), ".data", Util.GetFullPath (folder), fileName, typeMap, this);
		}
Ejemplo n.º 12
0
		public void Write (FileDatabase fileDatabase, string file)
		{
			fileDatabase.WriteObject (file, this, typeMap);
		}
Ejemplo n.º 13
0
		public static AddinHostIndex Read (FileDatabase fileDatabase, string file)
		{
			return (AddinHostIndex) fileDatabase.ReadObject (file, typeMap);
		}
		internal void SaveBinary (FileDatabase fdb)
		{
			if (!canWrite)
				throw new InvalidOperationException ("Can't write incomplete description.");
			fdb.WriteSharedObject (AddinFile, FileName, typeMap, this);
//			BinaryXmlReader.DumpFile (configFile);
		}
		public AddinDatabase (AddinRegistry registry)
		{
			this.registry = registry;
			addinDbDir = Path.Combine (registry.RegistryPath, "addin-db-" + VersionTag);
			fileDatabase = new FileDatabase (AddinDbDir);
		}
		internal void SaveHostBinary (FileDatabase fdb, string basePath)
		{
			if (!canWrite)
				throw new InvalidOperationException ("Can't write incomplete description.");
			if (!fromBinaryFile)
				FileName = null;
			FileName = fdb.WriteSharedObject (basePath, AddinId, ".mroot", AddinFile, FileName, typeMap, this);
		}
Ejemplo n.º 17
0
 public static AddinHostIndex Read(FileDatabase fileDatabase, string file)
 {
     return((AddinHostIndex)fileDatabase.ReadObject(file, typeMap));
 }