public static ObjectId fromString(String str) {if (str.length() != Constants.OBJECT_ID_STRING_LENGTH) {throw new InvalidObjectIdException(str);}return fromHexString(Constants.encodeASCII(str), 0);}
public static NGit.ObjectId FromString(string str){if (str.Length != Constants.OBJECT_ID_STRING_LENGTH){throw new ArgumentException("Invalid id: " + str);}return FromHexString(Constants.EncodeASCII(str), 0);}