internal static void WriteFileToDisk(IFile file)
        {
            Verify.ArgumentNotNull(file, "file");

            FileSystemFileBase baseFile = file as FileSystemFileBase;

            Verify.ArgumentCondition(baseFile != null, "file", "The type '{0}' does not inherit the class '{1}'"
                                     .FormatWith(file.GetType(), typeof(FileSystemFileBase)));

            if (Transaction.Current == null)
            {
                LogNoTransaction();

                baseFile.CommitChanges();
            }
            else
            {
                Transaction.Current.EnlistVolatile(new WriteToDiskEnlistment(file, baseFile), EnlistmentOptions.None);
            }
        }
            public void Commit(Enlistment enlistment)
            {
                baseFile.CommitChanges();

                enlistment.Done();
            }