public static uint MakeForString(string s) { var inst = new AdlerChecksum(); if (!inst.TryMakeForString(s)) { throw new InvalidOperationException(string.Format(Resources.AdlerChecksum_MakeForString_Invalid_string___0___for_checksum, s ?? @"(null)")); } return(inst.ChecksumValue); }
public static uint MakeForBuff(byte[] bytesBuff) { var inst = new AdlerChecksum(); if (!inst.TryMakeForBuff(bytesBuff)) { throw new InvalidOperationException(Resources.AdlerChecksum_MakeForBuff_Invalid_byte_buffer_for_checksum); } return(inst.ChecksumValue); }
public bool Equals(AdlerChecksum obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } return(obj.ChecksumValue == ChecksumValue); }
public static uint MakeForFile(string sPath) { var inst = new AdlerChecksum(); if (!inst.TryMakeForFile(sPath)) { throw new IOException( string.Format( Resources.AdlerChecksum_MakeForFile_Failure_attempting_to_calculate_a_checksum_for_the_file__0__, sPath)); } return(inst.ChecksumValue); }
public bool Equals(AdlerChecksum obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; return obj.ChecksumValue == ChecksumValue; }
public static uint MakeForString(string s) { var inst = new AdlerChecksum(); if (!inst.TryMakeForString(s)) throw new InvalidOperationException(string.Format(Resources.AdlerChecksum_MakeForString_Invalid_string___0___for_checksum, s ?? "(null)")); // Not L10N return inst.ChecksumValue; }
public static uint MakeForFile(string sPath) { var inst = new AdlerChecksum(); if (!inst.TryMakeForFile(sPath)) throw new IOException( string.Format( Resources.AdlerChecksum_MakeForFile_Failure_attempting_to_calculate_a_checksum_for_the_file__0__, sPath)); return inst.ChecksumValue; }
public static uint MakeForBuff(byte[] bytesBuff) { var inst = new AdlerChecksum(); if (!inst.TryMakeForBuff(bytesBuff)) throw new InvalidOperationException(Resources.AdlerChecksum_MakeForBuff_Invalid_byte_buffer_for_checksum); return inst.ChecksumValue; }