Beispiel #1
0
 public static string GuidToString(Guid guid)
 {
     if (DatabaseLanguageIsMsSql.Value)
     {
         return(guid.ToString().ToUpper());
     }
     else if (DatabaseLanguageIsOracle.Value)
     {
         return(CsUtility.ByteArrayToHex(guid.ToByteArray()));
     }
     else
     {
         throw new FrameworkException(UnsupportedLanguageError);
     }
 }
Beispiel #2
0
        /// <param name="sampleSourceFile">Any file from the cached file group, extension will be ignored.</param>
        public void SaveHash(string sampleSourceFile, byte[] hash)
        {
            string hashFile = Path.GetFullPath(Path.ChangeExtension(sampleSourceFile, ".hash"));

            File.WriteAllText(hashFile, CsUtility.ByteArrayToHex(hash), Encoding.ASCII);
        }