static void Main(string[] args) { var db = @"Data Source=D:\Temp\sisotest.sdf".CreateSqlCe4Db(); db.EnsureNewDatabase(); var info = new FileInfo2(@"D:\Temp\test.txt"); db.UseOnceTo().InsertAs <FileData>(info); }
/// <summary> /// Valida o pacote. /// </summary> /// <param name="assemblyPackage"></param> /// <param name="files"></param> /// <returns></returns> private bool Validate(IAssemblyPackage assemblyPackage, IDictionary <string, FileInfo2> files) { if (assemblyPackage == null) { return(false); } FileInfo2 info = null; foreach (var part in assemblyPackage) { if (!files.TryGetValue(part.Source, out info) || info.LastWriteTime > assemblyPackage.CreateTime) { return(false); } } return(true); }