WriteObject() private method

private WriteObject ( ObjectType type, long len, Stream input, bool store ) : ObjectId
type ObjectType
len long
input Stream
store bool
return ObjectId
Ejemplo n.º 1
0
 private ObjectId GenSha1(string data)
 {
     var input = new MemoryStream(data.getBytes());
     var writer = new ObjectWriter(db);
     try
     {
         return writer.WriteObject(ObjectType.Blob, data.getBytes().Length, input, true);
     }
     catch (IOException exception)
     {
         Assert.Fail(exception.ToString());
     }
     return null;
 }