Esempio n. 1
0
    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);
    }
Esempio n. 2
0
        /// <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);
        }